D
Derrick
Hello all;
I'm trying to simulate a "scrollable context menu". What I want is to have
a listbox fill the entire area of a small form (with no border).
Using the designer and property grid, I noticed that if I set the form size
first, then try to copy and paste this value into the size of the listbox
(making sure the listbox is in location 0,0 first), the designer won't let
the listbox fill the entire form area - there are 9 pixels of the form at
the bottom still showing (when you paste the size value in for the listbox,
watch how 9 is magically subtracted from the height).
If I go the other way, and set the size of the listbox first, then paste
that value into the size of the form, it works OK.
Can anyone explain the difference to me? I think it might have something to
do with the absence of the title bar - there seems to be a 4x4 pixel border
around that, which is probably left behind when I set border style to
"none".
Also, when I try to create the listbox in code, the 9 pixels always show,
regardless of whether I set the size of the form or listbox first.
Thanks for any info,
Derrick
I'm trying to simulate a "scrollable context menu". What I want is to have
a listbox fill the entire area of a small form (with no border).
Using the designer and property grid, I noticed that if I set the form size
first, then try to copy and paste this value into the size of the listbox
(making sure the listbox is in location 0,0 first), the designer won't let
the listbox fill the entire form area - there are 9 pixels of the form at
the bottom still showing (when you paste the size value in for the listbox,
watch how 9 is magically subtracted from the height).
If I go the other way, and set the size of the listbox first, then paste
that value into the size of the form, it works OK.
Can anyone explain the difference to me? I think it might have something to
do with the absence of the title bar - there seems to be a 4x4 pixel border
around that, which is probably left behind when I set border style to
"none".
Also, when I try to create the listbox in code, the 9 pixels always show,
regardless of whether I set the size of the form or listbox first.
Thanks for any info,
Derrick