Recent

Author Topic: [SOLVED] TComboBox Events  (Read 777 times)

Slyde

  • Full Member
  • ***
  • Posts: 152
[SOLVED] TComboBox Events
« on: January 19, 2023, 10:06:04 pm »
It's hard for me to imagine one wld mirror the other, so I'm wondering what the difference is between TComboBox.OnChange and .OnSelect
« Last Edit: January 19, 2023, 10:20:34 pm by Slyde »
Linux Mint 21.3
Lazarus 3.0

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2269
  • Fifty shades of code.
    • Delphi & FreePascal
Re: TComboBox Events
« Reply #1 on: January 19, 2023, 10:16:44 pm »
It's hard for me to imagine one wld mirror the other, so I'm wondering what the difference is between TComboBox.OnChange and .OnSelect?
OnChange = gets fired when the text of the combobox change
OnSelect = gets fired when ItemIndex change
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

Slyde

  • Full Member
  • ***
  • Posts: 152
Re: TComboBox Events
« Reply #2 on: January 19, 2023, 10:20:12 pm »
Works for me.  Thanks.
Linux Mint 21.3
Lazarus 3.0

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2269
  • Fifty shades of code.
    • Delphi & FreePascal
Re: TComboBox Events
« Reply #3 on: January 19, 2023, 10:36:27 pm »
Works for me.  Thanks.
You are welcome and another advice, if not already done, is to activate the hints, they are really helpful and tell you what does what, a micro life saver you can say.
(or was it the information box... idk... i activate all  :P )

First image show you where to activate, at least on my Lazarus installation I did it that way.
Second image show what happen when you than click on a property/method/whatsever, in that case, the OnSelect from the combobox :-]
« Last Edit: January 19, 2023, 10:40:23 pm by KodeZwerg »
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

Boleeman

  • Hero Member
  • *****
  • Posts: 924
Re: [SOLVED] TComboBox Events
« Reply #4 on: January 19, 2023, 10:41:14 pm »
I was just hovering over the control, as well as going to the events part as well.

Slyde

  • Full Member
  • ***
  • Posts: 152
Re: [SOLVED] TComboBox Events
« Reply #5 on: January 19, 2023, 11:07:18 pm »
That shld be checked by default  :D   I had no idea that popup menu was even there.  Thanks for the heads up, KodeZwerg.
Linux Mint 21.3
Lazarus 3.0

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2269
  • Fifty shades of code.
    • Delphi & FreePascal
Re: [SOLVED] TComboBox Events
« Reply #6 on: January 19, 2023, 11:19:35 pm »
That shld be checked by default  :D   I had no idea that popup menu was even there.  Thanks for the heads up, KodeZwerg.
Me was also unknowing, just found out by accidently reading some threads in here, I do love that feature even if I have no clue about how I can fill that box with my own info when I create components...
I should put my eyes on documention to find out  :D
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

 

TinyPortal © 2005-2018