Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread TButtonComboBox Issue.
Tue, Jul 14 2015 2:41 AMPermanent Link

Steve Gill

Avatar

Hi Tim,

I am having a problem with TButtonComboBox.  If I add some items to the Items property, when I try to search for an item it doesn't work.

For example, if I add 3 items called 'One', 'Two', 'Three' and then try to find them, they are not found.

This doesn't work:

    cmbTest.ItemIndex := cmbTest.Items.IndexOf('Two');

This doesn't either:

    cmbTest.ItemIndex := cmbTest.Items.IndexOfValue('Two');

Nor this:

    cmbTest.ItemIndex := cmbTest.Items.IndexOfName('Two', 0, True);

Or this:

    cmbTest.ItemIndex := cmbTest.Items.IndexOfName('Two', 0, False);

Am I doing something wrong?

= Steve
Tue, Jul 14 2015 3:56 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Steve,

<< I am having a problem with TButtonComboBox.  If I add some items to the
Items property, when I try to search for an item it doesn't work. >>

It's a trailing CRLF that isn't being parsed correctly, and is screwing up
the searches.  I'll have a fix for this in the next minor release.

Tim Young
Elevate Software
www.elevatesoft.com
Tue, Jul 14 2015 4:37 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Steve,

BTW, the fix is this:

in WebLists unit:

{ TListStrings }

constructor TListStrings.Create(AControl: TListControl);
begin
  inherited Create;
  FListControl:=AControl;
  LineSeparator:=LF;  <<<<<<<<<<<<  Remove this line !!!!!
end;

Then, you'll need to restart the IDE, modify the Items property for the
button combo and re-save it.  That will fix things.

There is a similar problem with the TMultiLineEdit control, but the fix is
more complicated.

As of the next minor release, the line separators will be standardized as
CRLF, which is what they should have been standardized as in the initial
2.00 release.  There was some EWB1 straggler code in there that should have
been corrected.  All of this goes back to the fact that IE used to use
different line feeds for text areas than other browsers (CRLF vs LF).

Tim Young
Elevate Software
www.elevatesoft.com



Tue, Jul 14 2015 5:39 PMPermanent Link

Steve Gill

Avatar

<< BTW, the fix is this:

in WebLists unit:

{ TListStrings }

constructor TListStrings.Create(AControl: TListControl);
begin
  inherited Create;
  FListControl:=AControl;
  LineSeparator:=LF;  <<<<<<<<<<<<  Remove this line !!!!!
end;

Then, you'll need to restart the IDE, modify the Items property for the
button combo and re-save it.  That will fix things.

There is a similar problem with the TMultiLineEdit control, but the fix is
more complicated.

As of the next minor release, the line separators will be standardized as
CRLF, which is what they should have been standardized as in the initial
2.00 release.  There was some EWB1 straggler code in there that should have
been corrected.  All of this goes back to the fact that IE used to use
different line feeds for text areas than other browsers (CRLF vs LF).  >>

Thanks Tim.

= Steve
Image