Re: [Lazarus] TComboBox
On Sat, 15 Aug 2015 14:56:05 -0500 Larry Dalton wrote: > I am using lazarus 1.4.2 on Linux Mint unit and 1.2.6 on Windows 7 unit. > Combo box is has a scroll bar on the windows unit but not the linux unit. > Which is the problem: windows/linux or 1.4 vs 1.2? Usually under Linux (Gtk2) a combo box does not have a scroll bar. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] TComboBox
I am using lazarus 1.4.2 on Linux Mint unit and 1.2.6 on Windows 7 unit. Combo box is has a scroll bar on the windows unit but not the linux unit. Which is the problem: windows/linux or 1.4 vs 1.2? Sent from my iPhone -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] TComboBox listbox width
Hi, what do I have to do to increase the listbox width of comboboxes depending on item widths? As expected the Windows specific method I used with Delphi no longer works with Lazarus. Thanks Frank -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] TComboBox in csDropDown Mode Fails for Partial Match
Hi Lazarus People! This is my first communication with the Lazarus community, so I'd like to start by introducing myself and saying a big thank you to everyone else involved. Lazarus is amazing on so many levels. My business is about computers, software development and support. I have been using Lazarus for application development for about a year now. I switched over from Delphi which I had been using since 1995. I look forward to hearing from you and if there is anything I can help you with please let me know. http://bugs.freepascal.org/view.php?id=25320 I have just documented a bug, see lazarus bugtracker ID 0025320. It's basically that the operation of the combobox is incorrect under certain conditions, where the text partially matches an item in the list. I found similar problems with TDBLookupComboBox and I plan to report those too. Kind regards, Andrew Pearse -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TComboBox with AutoComplete property
> I has many TComboBox components on the forms without the AutoComplete property set to True, so I was looking for the easy way to make it True during the run time. Then loop over the components instead of checking the Sender only -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-TComboBox-with-AutoComplete-property-tp4031889p4031906.html Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TComboBox with AutoComplete property
I has many TComboBox components on the forms without the AutoComplete property set to True, so I was looking for the easy way to make it True during the run time. On Fri, Jun 14, 2013 at 2:31 PM, leledumbo wrote: > OnCreate of what? For TForm, the Sender parameter would be... the form > itself. Why don't you directly set the property? i.e. > ComboBox1.AutoComplete > := true; > > > > -- > View this message in context: > http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-TComboBox-with-AutoComplete-property-tp4031889p4031893.html > Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TComboBox with AutoComplete property
OnCreate of what? For TForm, the Sender parameter would be... the form itself. Why don't you directly set the property? i.e. ComboBox1.AutoComplete := true; -- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-TComboBox-with-AutoComplete-property-tp4031889p4031893.html Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TComboBox with AutoComplete property
Normally we do that inside a tform.components loop Sorry about english mistakes _ William de Oliveira Ferreira Em 14/06/2013 04:04, "Johan Tu Toit" escreveu: > Good day, > > I tried the above code on my onCreate procedure: > > if Sender Is TComboBox then > with Sender As TComboBox do begin > AutoComplete:= True; > end; > > When I typed any letter on the TComboBox component, the AutoComplete > property do not auto select any element on the list. > > Thanks in advance. > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > > -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] TComboBox with AutoComplete property
Good day, I tried the above code on my onCreate procedure: if Sender Is TComboBox then with Sender As TComboBox do begin AutoComplete:= True; end; When I typed any letter on the TComboBox component, the AutoComplete property do not auto select any element on the list. Thanks in advance. -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TComboBox and OnChange
zeljko schrieb: so if user types text it'll call OnChange() for each char like in TEdit ? Yes. hm...I don't like it. Why not? 1. It breaks delphi compatibility 2. It breaks current apps which rely on combo OnChange() like dmitry stated Then the behaviour could be changed by a (global) option, for Delphi or Lazarus compatibility. DoDi -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TComboBox and OnChange
On Wednesday 24 March 2010 23:42, Michael Fuchs wrote: > zeljko: > > so if user types text it'll call OnChange() for each char like in TEdit ? > > Yes. > > > hm...I don't like it. > > Why not? 1. It breaks delphi compatibility 2. It breaks current apps which rely on combo OnChange() like dmitry stated eg. MyCombo.Text := 'blah'; MyComboChange(MyCombo); So if such combo have OnChange() assigned it'll fire twice. Problem is not in small apps, but apps with hundreds of forms and hundreds of combos are real PITA. In your case I'll prefer to add new event OnComboTextChange instead of firing text changes in OnChange(). zeljko -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TComboBox and OnChange
zeljko: > so if user types text it'll call OnChange() for each char like in TEdit ? Yes. > hm...I don't like it. Why not? > Does work this (cannot try at the moment) ? > i := ComboBox1.Items.Add('something'); > ComboBox1.ItemIndex := i; > OnChange() should fire on itemindex change if I remember correctly. No, this also didn't work. bye Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TComboBox and OnChange
On Wednesday 24 March 2010 15:51, Michael Fuchs wrote: > Am 24.03.2010 15:33, schrieb dmitry boyarintsev: > > On Wed, Mar 24, 2010 at 4:42 PM, Michael Fuchs > > > > wrote: > >> I know that this behaviour is the same as in Delphi, but I think it is > >> not consistent. Is it possible to change this? > > > > Why the behavior is not consistent? > > Because, if you try this with a TEdit, it works. > > > Since your code has changed Text value you're aware of the change > > happened. So you can call the necessary change handling code, like: > > > > ComboBox1.Text:='something'; > > ComboBox1Change(ComboBox1Text); > > Yes, in my case I try to test the OnChange calling in a fpcunit test. > The user selects a item of the dropdown list or types in text, but the > test just change the .Text property. so if user types text it'll call OnChange() for each char like in TEdit ? hm...I don't like it. Does work this (cannot try at the moment) ? i := ComboBox1.Items.Add('something'); ComboBox1.ItemIndex := i; OnChange() should fire on itemindex change if I remember correctly. zeljko -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TComboBox and OnChange
Am 24.03.2010 15:33, schrieb dmitry boyarintsev: On Wed, Mar 24, 2010 at 4:42 PM, Michael Fuchs wrote: I know that this behaviour is the same as in Delphi, but I think it is not consistent. Is it possible to change this? Why the behavior is not consistent? Because, if you try this with a TEdit, it works. Since your code has changed Text value you're aware of the change happened. So you can call the necessary change handling code, like: ComboBox1.Text:='something'; ComboBox1Change(ComboBox1Text); Yes, in my case I try to test the OnChange calling in a fpcunit test. The user selects a item of the dropdown list or types in text, but the test just change the .Text property. regards Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] TComboBox and OnChange
On Wed, Mar 24, 2010 at 4:42 PM, Michael Fuchs wrote: > I know that this behaviour is the same as in Delphi, but I think it is not > consistent. Is it possible to change this? Why the behavior is not consistent? Since your code has changed Text value you're aware of the change happened. So you can call the necessary change handling code, like: ComboBox1.Text:='something'; ComboBox1Change(ComboBox1Text); thanks, dmitry -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] TComboBox and OnChange
Hello, a little problem with the OnChange-Event of the TComboBox. If the user selects a item from the drop-down-list, OnChange is called. If the user places the cursor in the combobox and types a text, OnChange is also called. But if I set the text with the .Text-property [1], OnChange is NOT called. If i substitute the TComboBox with a TEdit, setting the .Text-property causes an OnChange-call. I know that this behaviour is the same as in Delphi, but I think it is not consistent. Is it possible to change this? regards Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus