Discussion:
making listbox wider programmaticaly...
(too old to reply)
*Lysander*
2008-11-02 23:25:42 UTC
Permalink
//////////////////////////////// see line below
////////////////////////////////////////////////
f.l = new listbox(f) //how do I make the listbox wider
programaticaly
//////////////////////////////////////////////////////////////////////////////////////////////////////////
I am not sure what you mean by "wider".
If you want to increase the size to the right, you can just do

f.l.width += 50

(if your form's metric is set to pixel, this will increase size by 50
pixel to the right)

something similar should work for the height:

f.l.height += 50
unknown
2008-11-03 06:35:26 UTC
Permalink
On Tue, 4 Nov 2008 15:57:07 -0500 Ivan Benttini
Sender: "Ivan Benttini" <***@nc.rr.com>
wrote the following in:
Newsgroup: dbase.programming
To anyone with some time to help me...
Please see my note on this form code...
//////////////////////////////// see line below
/////////////////////////////////////////////////////
f.l = new listbox(f) //how do I make the listbox wider
programaticaly
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
Thanks-Ivan
///////////////////////////////////////////////////
First set the form height and width, then set top, left, width and height for the listbox in order
to center it on the form, if that is what you want.

f = new form()
f.width = 30
f.height = 8
//////////////////////////////// see line below
f.l = new listbox(f) //how do I make the listbox wider programaticaly
f.l.left = 1
f.l.width = f.width - f.l.left*2
f.l.top = 0.4
f.l.height = f.height - f.l.top*2


Ivar B. Jessen
Bruce Beacham
2008-11-03 17:20:40 UTC
Permalink
Post by unknown
First set the form height and width, then set top, left, width and height for the listbox in order
to center it on the form, if that is what you want.
It's interesting that the listbox doesn't have an anchor property.


Bruce
Bruce Beacham
2008-11-03 21:52:49 UTC
Permalink
This group has lots of smart people, I would never had learn half of
what I know (although I still know little ) if was not for the help
of the kindness people like yourself and many others. I am a better
programmer, because of this group.
Now, where do you think _we_ all learned what we know?! Right here!


Bruce

Loading...