Questions tagged [tcombobox]

A TComboBox component is an edit box with a scrollable drop-down list attached to it. Users can select an item from the list or type directly into the edit box. TComboBox is a part of VCL library.

48 questions
10
votes
4 answers

Get currently selected Combobox value and use it as variable

My question is about Delphi 7. I need to get currently selected ComboBox1 value to use it as Floating point variable in my code: t:=t+ComboBox1. // Not sure what to write here... Thank you!
enflam3
  • 157
  • 1
  • 2
  • 10
8
votes
2 answers

How a Combobox with the csOwnerDrawFixed Style can behave like the csDropDown style?

I'm using a TComboBox component with the style property set to csOwnerDrawFixed, I implement the OnDrawItem And everything works fine, Now I want which the combobox to behave like when had the csDropDown style (with the csOwnerDrawFixed style…
Salvador
  • 16,132
  • 33
  • 143
  • 245
4
votes
2 answers

Is it possible to add a history list dropdown to Delphi's TButtonedEdit?

I'm using Delphi XE2's TButtonedEdit but I would like to add a dropdown list for the history (like TComboBox). I know that TComboBox is a glorified TEdit, so is there a message I can send to TButtonedEdit to add this functionality please? Thanks.
Brian Frost
  • 13,334
  • 11
  • 80
  • 154
3
votes
1 answer

TComboBoxEx item isn't drawing correctly when BiDiMode= bdRightToLeft and Style= csDropDownList and application use VCL Style

hi. TComboBoxEx item isn't drawing correctly when BiDiMode= bdRightToLeft and Style= csDropDownList and application use VCL Style; in DropDown list, icon and text drawn on the left and when selecting an item, icon drawn on left side and text will…
smartiz
  • 151
  • 7
2
votes
1 answer

Delphi FMX Unable to change the drop down text of a TCombobox TListItem at runtime

I am using Delphi 11 Alexandria and am building an FMX project for release on Windows, iOS, and Android. I am building a manual language translation system, to this end I have generated a mapping document that maps language text to components mapped…
2
votes
0 answers

Scroll bars on a Delphi FMX tComboBox.ListBox not showing on a Mac

I’m using Delphi 10.4.2 and trying to make the vertical scroll bar on the listbox of an FMX tCombox show all the time. It works fine on a PC but on a Mac the scrollbar disappears unless you’re actively scrolling the mouse wheel. If I put a regular…
Gregg
  • 63
  • 3
2
votes
1 answer

Set key value pairs in a combobox

What is the best way to set key/value pairs in a combo box? For example I want to set: Key: T1 Value: test 1 Key: T2 Value: test 2 Ecc...
Marco R.
  • 21
  • 4
2
votes
1 answer

How to avoid the user types into a TComboBox?

I would like that on a TCombobox the only way to change a value is by using the mouse. If the Items are 1,2 and 3 the user can type 4 and it becomes the value. i tried to use OnKeyDown but somehow i would like to "avoid key down". How to achieve…
UnDiUdin
  • 14,924
  • 39
  • 151
  • 249
2
votes
1 answer

can I change the color of python ttk combobox under windows?

I got working code under Linux to change the appearance of a TCombobox of Ttk under python 2.7. If I run the code under windows, it wont work. Im aware, that colors and also attributes of the ttk widgets are platform-dependant. Still I cannot figure…
Sammy
  • 21
  • 2
2
votes
2 answers

Delphi Livebinding object and combobox or radio buttons

I defined the subsequent unit for business logic unit Models.Person; interface Type TPersonGender = (pgUndefined, pgMale, pgFemale, pgNotApplicable); TSexOfPerson = class(TPersistent) private FGender : TPersonGender; protected …
2
votes
0 answers

Delphi TComboBox Dropdown fields filtering

I'm using a TComboBox at Delphi. How can I filter the dropdown fields displayed when I write some text (AutoDropDown set to True), to show me just the matching fields?
dcsmwy
  • 29
  • 1
  • 4
2
votes
1 answer

Is it possible to made a TCombo edit caret 'wider' or to 'bold' it?

I have an mode that uses TComboBox.SelStart to indicate progress along the edit text string. In this mode I would like to make some kind of change to the edit caret, for example to widen it to 2 pixels or 'bold' it in some way to indicate this mode…
Brian Frost
  • 13,334
  • 11
  • 80
  • 154
1
vote
1 answer

How to invoke a procedure created inside the New Component during the implementation

I have created and implemented a New Component and inside this created component, there is a procedure InitCombo that needs to be invoked in the implementation. How will I do that? Here's the procedure InitCombo inside the New Component: procedure…
RickyBelmont
  • 619
  • 4
  • 11
1
vote
1 answer

I am getting an error "Undeclared Identifier" on my newly created component with TComboBox ancestor

I have created a New Component with TComboBox ancestor using Wizard. Everything went smooth from compiling, building, and installing. Now I tried to use it and I am getting these errors: Structure Cannot resolve unit name 'SmartComboBox' at line…
RickyBelmont
  • 619
  • 4
  • 11
1
vote
2 answers

How to detect ODS_COMBOBOXEDIT in custom styled owner draw TComboBox

Using Delphi 10.3: In an owner-drawn TComboBox with Style=csOwnerDrawFixed, I want the owner drawn items in the DropDown list to be different from the static part of the combo. To discriminate between the two cases, I check for odComboBoxEdit in the…
Gerrit Beuze
  • 903
  • 2
  • 10
  • 26
1
2 3 4