Recent

Author Topic: Trouble with TFilteredComboBox  (Read 3024 times)

jamie

  • Hero Member
  • *****
  • Posts: 6943
Re: Trouble with TFilteredComboBox
« Reply #15 on: April 26, 2020, 01:51:57 pm »
Its amazing what controls you find broken when you start to look deeper..

for example the
TComboBoxEx..

 it has all the feathers Enabled of the standard combobox but the READ only is locked to READ ONLY,,, Cant change it..

 SO its basically a READ only with lots of wasted properties published..

EDIT:

 Yes I need to remove this control from one of my small projects..
 
 Also unless its fixed it should be removed form Lazarus too because its basically useless without the ability to edit in there.. Lots of eye candy that can't be touched.

 Because the READONLY properyty in the TCombobox has now be deactivated , controls depending in it will no longer work.

 I will test the latest 2.0.8 but I doubt that it's any better.
« Last Edit: April 26, 2020, 02:16:35 pm by jamie »
The only true wisdom is knowing you know nothing

simsee

  • Full Member
  • ***
  • Posts: 208
Re: Trouble with TFilteredComboBox
« Reply #16 on: April 26, 2020, 02:14:06 pm »
Thanks to all for the help. I will do some experiments. What I need is a combobox as defined in Wikipedia.

The desired behavior is the following. When I type characters in the edit, if there are matches, even partial, the list goes down and shows the items that match. If there are no matches, the list disappears. All dynamically as you type, as it happens, for example, when we type in the address bar of a browser. Nothing special. I'm probably wrong about setting some properties... but I can't get exactly that.

jamie

  • Hero Member
  • *****
  • Posts: 6943
Re: Trouble with TFilteredComboBox
« Reply #17 on: April 26, 2020, 02:25:08 pm »
What you are looking for is like a Dictionary of known items and you want only the items that match or partially match to show in the list box.

  And from those that match you can then scroll to select and hit enter of more than one item match..

  That can be done with a little extra work... I think a Owner draw box will do it where you load your list but only show depending what is typed in the edit box.

The only true wisdom is knowing you know nothing

simsee

  • Full Member
  • ***
  • Posts: 208
Re: Trouble with TFilteredComboBox
« Reply #18 on: April 26, 2020, 02:31:44 pm »
Ok. Thanks. I thought TListBox or TFilterListBox did this natively.

jamie

  • Hero Member
  • *****
  • Posts: 6943
Re: Trouble with TFilteredComboBox
« Reply #19 on: April 26, 2020, 03:58:55 pm »
The TFileListBox is using the OS version of viewing files..

The TFilterListBox is just re-instating the MASK property and each time it gets changed the TFileListBox updates the contents...

TFilterListBox is designed to handle file extention mask.

For what you want you need to have a complete list of possibilities and then ether implement a ownersdraw combo box to only show those that match or have it load the listbox of the combobox from another source as the user is typing in there text..

 How long of a list are you looking at ?
The only true wisdom is knowing you know nothing

Thaddy

  • Hero Member
  • *****
  • Posts: 17099
  • Ceterum censeo Trump esse delendam
Re: Trouble with TFilteredComboBox
« Reply #20 on: April 26, 2020, 04:52:18 pm »
Add FilterRexEx , maybe?
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

jamie

  • Hero Member
  • *****
  • Posts: 6943
Re: Trouble with TFilteredComboBox
« Reply #21 on: April 26, 2020, 05:05:36 pm »
he most likely would want the Que banner text in there too which only is supported in windows directly..

 Some controls have the hintText property for this but I don't see that in the Combobox.

 I think for the most part he can load the combobox with all the possible lines and then populate another list with the matches. This way the AutoComplete text can still be used.
  que banner can be enabled via a Sendmessage if you are on Windows. But I don't see how that can  help other targets
The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018