Skip to main content

[Migrated content. Thread originally posted on 22 November 2004]

In our new GUI programs we are sizing everything in CELLS to be consistent across various resolutions of Windows.

However, we've noticed that the number of lines inside a paged list-box is very inconsistent and we're not sure how to get around this.

My PC is set at 1280x1024 with small fornts and when I run a program with a paged list-box that is LINES 10 CELLS, it appears that it could hold about 12.5 lines. However the same paged list-box running on a PC at 1280x1024 with large fonts appears to only contain about 8 lines.

How can we consistently size these paged list-boxes so that we know how many lines are in them?

Alternatively, is there a way to determine how many lines will fit into a certain sized paged list-box.

We thought about adding test lines until the first lines 'drops off' but this is a bit mickey-mouse.

Anybody got any good ideas?

[Migrated content. Thread originally posted on 22 November 2004]

In our new GUI programs we are sizing everything in CELLS to be consistent across various resolutions of Windows.

However, we've noticed that the number of lines inside a paged list-box is very inconsistent and we're not sure how to get around this.

My PC is set at 1280x1024 with small fornts and when I run a program with a paged list-box that is LINES 10 CELLS, it appears that it could hold about 12.5 lines. However the same paged list-box running on a PC at 1280x1024 with large fonts appears to only contain about 8 lines.

How can we consistently size these paged list-boxes so that we know how many lines are in them?

Alternatively, is there a way to determine how many lines will fit into a certain sized paged list-box.

We thought about adding test lines until the first lines 'drops off' but this is a bit mickey-mouse.

Anybody got any good ideas?
You could predetermine a number of lines that fit for the particular resolutions, then just get the resolution and determine from that. Or, you may also use the library function C$TEXTSIZE to get the measures of the appearance and use that as a foundation.

[Migrated content. Thread originally posted on 22 November 2004]

In our new GUI programs we are sizing everything in CELLS to be consistent across various resolutions of Windows.

However, we've noticed that the number of lines inside a paged list-box is very inconsistent and we're not sure how to get around this.

My PC is set at 1280x1024 with small fornts and when I run a program with a paged list-box that is LINES 10 CELLS, it appears that it could hold about 12.5 lines. However the same paged list-box running on a PC at 1280x1024 with large fonts appears to only contain about 8 lines.

How can we consistently size these paged list-boxes so that we know how many lines are in them?

Alternatively, is there a way to determine how many lines will fit into a certain sized paged list-box.

We thought about adding test lines until the first lines 'drops off' but this is a bit mickey-mouse.

Anybody got any good ideas?
You could predetermine a number of lines that fit for the particular resolutions, then just get the resolution and determine from that. Or, you may also use the library function C$TEXTSIZE to get the measures of the appearance and use that as a foundation.

[Migrated content. Thread originally posted on 22 November 2004]

In our new GUI programs we are sizing everything in CELLS to be consistent across various resolutions of Windows.

However, we've noticed that the number of lines inside a paged list-box is very inconsistent and we're not sure how to get around this.

My PC is set at 1280x1024 with small fornts and when I run a program with a paged list-box that is LINES 10 CELLS, it appears that it could hold about 12.5 lines. However the same paged list-box running on a PC at 1280x1024 with large fonts appears to only contain about 8 lines.

How can we consistently size these paged list-boxes so that we know how many lines are in them?

Alternatively, is there a way to determine how many lines will fit into a certain sized paged list-box.

We thought about adding test lines until the first lines 'drops off' but this is a bit mickey-mouse.

Anybody got any good ideas?
You could predetermine a number of lines that fit for the particular resolutions, then just get the resolution and determine from that. Or, you may also use the library function C$TEXTSIZE to get the measures of the appearance and use that as a foundation.