Recent

Author Topic: TCombobox dropUPlist?  (Read 782 times)

torbente

  • Sr. Member
  • ****
  • Posts: 325
    • Noso Main Page
TCombobox dropUPlist?
« on: January 20, 2021, 11:18:54 pm »
Thats the question? Can a TCombobox display the options upward?
Noso Cryptocurrency Main Developer
https://github.com/DevTeamNoso/NosoWallet

dseligo

  • Hero Member
  • *****
  • Posts: 1196
Re: TCombobox dropUPlist?
« Reply #1 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.

Gald

  • Full Member
  • ***
  • Posts: 107
Re: TCombobox dropUPlist?
« Reply #2 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.
Lazarus 2.0.12 r64642 FPC 3.2.0 x86_64-win64-win32/win64/Manjaro KDE 21
AMD Ryzen 3 1300X Quad-Core Processor 3.50 GHz / 8,00 GB RAM / GTX 1500 TI / 2TB M.2 NVMe

jamie

  • Hero Member
  • *****
  • Posts: 6091
Re: TCombobox dropUPlist?
« Reply #3 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.

The only true wisdom is knowing you know nothing

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: TCombobox dropUPlist?
« Reply #4 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