tlistbox

Hiding items in TListBox while filtering by String

你说的曾经没有我的故事 提交于 2020-06-08 07:57:50
问题 Short Version : Is there any way to control or modify LisBox items individually? for example set their Visible property to False separately. I found a TListBoxItem class in Fire Monkey when I was searching, but I don't want to use Fire Monkey and want it in VCL. Detailed Version : I tried to filter my ListBox using two TStringList and an Edit, one StringList is global to keep the original list ( list_files_global ) and another StringList to help filtering procedure ( list_files_filter ) and

How to get rid of TListBox vertical scroll limit?

我的未来我决定 提交于 2020-01-12 07:46:13
问题 I've implement a log viewer using a TListBox in virtual mode. It works fine (for all the code I wrote), displays the content as expected (I even added an horizontal scrollbar easily), but I guess I've reached the some kind of limit of the vertical scrollbar. That is, when I scroll the vertical bar from the top to the bottom, it will not scroll the content to the end of the list, but only to some limit. Do you know any possibility to get rid of this limit? I tried with SetScrollInfo , but it

Using Livebindings to Assign Several Field Values to an FMX MetropolisUI TListBox Item.Text

空扰寡人 提交于 2020-01-03 02:27:11
问题 I am coding a FMX Metropolis UI application and trying to assign two field values of type string to the Item.Title member of TListBox by LiveBindings technology (using expression engine). When I use a TBindList in the following way: object BindList1: TBindList Category = 'Lists' ControlComponent = ListBox1 SourceComponent = BindSourceDB1 FormatExpressions = < item ControlExpression = 'Text' SourceExpression = 'FieldByName("name1").Text + " " + Field' + 'ByName("name2").Text' end>

Creating specific Custom TListBoxItem with given example and trouble with fontColor property

人走茶凉 提交于 2019-12-07 07:10:25
问题 Can someone please guide me in the right direction. I am attempting to create a Custom ListboxItem using Delphi XE4 for a iOS application. My goal output would be something along the lines of the photo above, where as I am currently stuck here (image below). I have been successful at dynamically generating a ListBoxItem and inserting an TLabel object, however, I am unable to change the 'fontColor' property of the TLabel to a desired color. I can code TLabel.Fontcolor := ClaBlue; But the color

Using Livebindings to Assign Several Field Values to an FMX MetropolisUI TListBox Item.Text

佐手、 提交于 2019-12-06 16:20:31
I am coding a FMX Metropolis UI application and trying to assign two field values of type string to the Item.Title member of TListBox by LiveBindings technology (using expression engine). When I use a TBindList in the following way: object BindList1: TBindList Category = 'Lists' ControlComponent = ListBox1 SourceComponent = BindSourceDB1 FormatExpressions = < item ControlExpression = 'Text' SourceExpression = 'FieldByName("name1").Text + " " + Field' + 'ByName("name2").Text' end> FormatControlExpressions = <> ClearControlExpressions = <> end It assigns the 'name1 name2' string to the member

Delphi TListBox OnClick / OnChange?

那年仲夏 提交于 2019-12-05 23:07:29
问题 Is there a trick to getting "OnChange" type of functionality with a TListBox? I can subclass the component and add a property, etc then only carry out OnClick code if the Index changes... I can also hack it with a form level variable to store the current index but just wondering if I'm overlooking the obvious before I go one way or the other. 回答1: There seems to be no way other than implementing this by yourself. What you need is to remember the currently selected item and whenever the

Delphi TListBox OnClick / OnChange?

試著忘記壹切 提交于 2019-12-04 05:04:15
Is there a trick to getting "OnChange" type of functionality with a TListBox? I can subclass the component and add a property, etc then only carry out OnClick code if the Index changes... I can also hack it with a form level variable to store the current index but just wondering if I'm overlooking the obvious before I go one way or the other. There seems to be no way other than implementing this by yourself. What you need is to remember the currently selected item and whenever the ItemIndex property is changed from code or whenever the control receives the LBN_SELCHANGE notification (which

How to get rid of TListBox vertical scroll limit?

[亡魂溺海] 提交于 2019-12-03 13:34:12
I've implement a log viewer using a TListBox in virtual mode . It works fine (for all the code I wrote), displays the content as expected (I even added an horizontal scrollbar easily), but I guess I've reached the some kind of limit of the vertical scrollbar. That is, when I scroll the vertical bar from the top to the bottom, it will not scroll the content to the end of the list, but only to some limit. Do you know any possibility to get rid of this limit? I tried with SetScrollInfo , but it didn't work since the limit sounds to be not in the scrollbar, but in the TListBox itself. I know the

Delphi asynchronous write to TListBox

旧街凉风 提交于 2019-12-02 07:57:39
问题 I want to write from multiple threads/processes to a TListBox called 'listMessages' and I have this two procedures in order to do this : 1- With adding object : procedure Log(Msg: String; Color: TColor); begin listMessages.Items.AddObject(Msg, Pointer(Color)); listMessages.ItemIndex := listMessages.Items.Count -1; end; 2- With TIdCriticalSection called protectListMessages : procedure TMainForm.safelyLogMessage(mess : String); begin protectlistMessages.Enter; try listMessages.Items.Add(mess);

Drawing unicode text on listbox canvas is too slow

 ̄綄美尐妖づ 提交于 2019-12-01 06:00:34
I am trying to display news from a RSS in a listbox using the following format as shown in the image below. The application on the screenshot has been developed in firemonkey by styling the listbox. I need to display the same in my VCL application. The requirements of this layout are: The news title should be bold text The short description should be located at bottom and it should be wrapped if it doesn't fit in a single line(as shown in the image); font-style should be normal There should be an image for each news item My code so far: procedure TfrmDatePicker.ListBox1DrawItem(Control: