Lazarus

Free Pascal => Beginners => Topic started by: torbente on January 20, 2021, 11:18:54 pm

Title: TCombobox dropUPlist?
Post by: torbente on January 20, 2021, 11:18:54 pm
Thats the question? Can a TCombobox display the options upward?
Title: Re: TCombobox dropUPlist?
Post by: dseligo on January 20, 2021, 11:55:39 pm
Yes, you put it near the bottom of the screen and then it goes upward.  :)
But I don't know how to do it when it's not near the bottom of the screen.
Title: Re: TCombobox dropUPlist?
Post by: Gald on January 21, 2021, 02:10:00 am
Such a great idea!

I'll try to do one latter using only panels like in B.png.
Title: Re: TCombobox dropUPlist?
Post by: jamie on January 21, 2021, 02:18:02 am
There's ways to simulate that I guess.

use a TEdit, TupDown and associate it to the TEDit and then use a TPOPUpMenu populated with the list of items

 The Popup can be shown at will at what ever location you want.

 Or use a TFORM with a TlistBox inside it and show that any time from the TEDIT Box and automate that a little by closing the form when ever it loses focus.. I do that with a  custom TreeView list inside a TFORM and I close it when ever the mouse goes out side of it.

Title: Re: TCombobox dropUPlist?
Post by: Handoko on January 21, 2021, 02:48:57 am
It is not what exactly what OP want, but by adding a TEdit and some code, it can be a combo dropuplist:

https://forum.lazarus.freepascal.org/index.php/topic,37369.msg250939.html#msg250939
TinyPortal © 2005-2018