View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0037008||Lazarus||LCL||public||2020-05-02 19:24||2020-05-03 13:26|
|Reporter||jamie philbrook||Assigned To|
|Summary||0037008: TcomboBox.style not Delphi compliant and is causing TComboBoxEx to fail in any form or Editing(AutoComplete etc)|
|Description||Changes made to the "Style" property which is making it not Delphi compatible anymore, also TComboBoxEx no longer works or does not work for any function that requires Editing features, its locked to a csDropDownList;|
I know how much the community really wants to stay compliant with Delphi, or that is what I keep reading..
I can't tell you how many other controls most likely are affective by this if they are doing any form of owner drawing using Delphi compatible styles.
Delphi does not have OwnerDrawEditableFixed or Variable and is causing issues with controls that are using ownerDraw flags getting the wrong values.
|Tags||No tags attached.|
|Fixed in Revision|
I don't know exactly how TComboBoxEx should work. What broke it and when?
Looks like always DropDownList indeed. Only 3 styles are supported.
TComboBoxExStyle = (csExDropDown, csExSimple, csExDropDownList);
Please provide an example project and explain how it should work.
> I can't tell you how many other controls most likely are affective by this
> if they are doing any form of owner drawing using Delphi compatible styles.
How would TComboBox changes affect other controls? Please be more specific.
> Delphi does not have OwnerDrawEditableFixed or Variable and is causing
> issues with controls that are using ownerDraw flags getting the wrong values.
Why would they get wrong values? Explain please.
TComboBox.Style in LCL has been extended but remains Delphi compatible AFAIK.
Please concentrate on the quality of your bug reports. Give detailed information about the bug and clear steps to reproduce.
Now most of your text is abstract ranting which should go to mailing list or forum. Your other bug report had the same problem.
Say what you want..
I type casted the TComboboxEx and was able to get it to work partially...
The base TCombobox is not compliant to Delphi... and apparently somehow it's effecting the TComboboxEx. in the Style property not the StyleEX.
I don't know I'll have to ding in deeper but the order of the ordinals in the set are not even the same..
I've seen code where there is a cast over the set /enum so if the order is wrong then wrong values are produced .
You can do as you wish but one is not Delphi compatible while the other just does not work as a csDropDown, it only works as a csDropDownlist..
I can't believe the TComboboxEx has always been this way, is so then its not even close to what it should be doing as documented via Delphi spec's also!
I have experimented with the TComboBox itself to ensure the AutoComplete keyboard stream is working while in ownerDrawFixed, which is what the TcomboboxEx is using..
But for the TComboBoxEx itself, the AutoComplete stream is not getting processed for the normal key match, just scrolling keys only.
I'll ding into deeper.. See if there is anything I can do to make it work with existing level of other controls.
> Say what you want..
What does that mean? I can say what I want but you will ignore it and continue ranting? Right.
I can see only one bug: TComboboxEx behaves always like DropDownList.
You could have just reported that and leave the other waffling out.
Can you please fix the bug and provide a patch.
I think I found the issue with the TComboBoxEx..
It appears a sub list of items are being built and the Items.Strings of the base Tcombobox isn't being populated. or it is at startup
while the control is loading but empty strings are being inserted to the base ITEMS property (stringlist)
When the base TCombobox isn't populated with valid strings, the AutoCompleteText has nothing for it to look at and there fore
the reason as to why it does not work..
The TComboboxEx is a OwnerDrawFixed style it isn't a DropDownList but is currently behaving like one which it shouldn't be.
I am close to the problem now, this involves a TCollections class that is part of the mix holding these items, but none of the captions never populate over to the real items list.
Simply put the ITEMS property in the base class (TCombobox) needs to be populated for this to work.
I'll come back hopefully with a fix..
I have made a Test jig method block that corrects the problem but this code would need to be inserted in several places in the code, not just one due to the way it is written.
procedure TForm1.ComboBoxEx1Enter(Sender: TObject);
with TComboBoxEx(Sender) do
For I in ItemsEx do Items.Add(TComboExItem(I).Caption);
This corrects the issue by populating the base class combobox items list., with this code the AutoCompleteText will work.
Is it possible to notify the author of this control and ask them to possible consider this fix but figure out the best place to put it?
I think it's best for the originator to fix it, mean while I can use this code.
> Is it possible to notify the author of this control and ask them to possible consider this fix but figure out the best place to put it?
No, you can as well fix it and provide a patch.
The component author is Vojtěch Čihák. It was added to LCL in September 2014 by me.
I don't know how much time Vojtěch now has for this component.
Anyway bugs can be fixed by anybody. Just study thoroughly the code and the problem, then fix it, then create a patch.
Ok, I believe I found a proper place in the Inc file to correct the issue. While there I also found the SORT function faults which is unrelated so it looks I like I need to present a complete INC file, the unit file seems ok at this point. I'll get back
> so it looks I like I need to present a complete INC file
No, just the diff (and use trunk to create the diff please)
|2020-05-02 19:24||jamie philbrook||New Issue|
|2020-05-02 20:13||Juha Manninen||Note Added: 0122602|
|2020-05-02 20:13||Juha Manninen||Note Edited: 0122602||View Revisions|
|2020-05-02 20:15||Juha Manninen||Note Edited: 0122602||View Revisions|
|2020-05-02 21:31||jamie philbrook||Note Added: 0122607|
|2020-05-02 22:56||jamie philbrook||Note Added: 0122608|
|2020-05-03 00:15||Juha Manninen||Note Added: 0122609|
|2020-05-03 00:30||jamie philbrook||Note Added: 0122610|
|2020-05-03 03:10||jamie philbrook||Note Added: 0122611|
|2020-05-03 09:18||Juha Manninen||Note Added: 0122612|
|2020-05-03 09:34||Juha Manninen||Note Edited: 0122612||View Revisions|
|2020-05-03 12:25||jamie philbrook||Note Added: 0122615|
|2020-05-03 13:26||Bart Broersma||Note Added: 0122616|