Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 28 Mar 2024, 15:20

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 06 May 2022, 10:53 
Offline

Joined: 13 Jul 2019, 19:08
Posts: 88
I don't want the user to type anything in "DbComboboxEh"
in this way I put "LimitTextToListValues = True"
I put the search for "DropDownBox.AutoFilterType = lsftContainsEh"

I put two items
'Campo Mourao'
'Movements'

If I type "Mo" when typing the letter "u" it crashes and cannot summarize for Item = 'Campo mourao'

See the attached video.
https://mega.nz/file/c2ZAEJDC#W_gGHiPNQ ... ykEJNg7f-A

Another problem is that if you have a number in front the search cannot be done
example :

1 - Campo Mourao
2 - Movement

if I type "M" nothing happens.


Top
 Profile  
 
PostPosted: 06 May 2022, 17:13 
Offline

Joined: 08 May 2014, 18:06
Posts: 660
Hello

1. If you populate the Items and KeyItems properties, then those properties must contain the same number of values. Otherwise, the behavior of the component may be unpredictable.

2. LimitTextToListValues = True and DropDownBox.AutoFilterType = lsftContainsEh are mutually exclusive properties.
To search through lsftContainsEh, you need to be able to enter text that is not in the list.
For your case, you need to remove LimitTextToListValues = True and add a check in the DBComboBoxEh.OnExit event.

Code:
procedure TForm2.DBComboBoxEh1Exit(Sender: TObject);
begin
  if DBComboBoxEh1.ItemIndex = -1 then
  begin
    ShowMessage('DBComboBoxEh1 must contain a value from the list.');
  end;
end;

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
PostPosted: 06 May 2022, 20:22 
Offline

Joined: 13 Jul 2019, 19:08
Posts: 88
My problem is 3 new clients that used a system whose components are from DevExpress
the customer has gotten used to it and wants you to do something similar.

These Damn DevExpress Components are read-only and can do search.

The problem is that leaving LimitTextToListValues = False
the Customer has to click the button instead of clicking any part of the text to open the Dropdown List, it's another thing for the customer to write something that is not on the list.
there are several problems leaving LimitTextToListValues = false
and these new customers are on my tail unfortunately.

If the colleague could give a better analysis to be able to do research using "LimitTextToListValues = True"

I would be very grateful

See this attached video.

https://mega.nz/file/Fvh3nYBI#Ecay-20nc ... JI9yFtQlWI


Top
 Profile  
 
PostPosted: 06 May 2022, 23:27 
Offline

Joined: 08 May 2014, 18:06
Posts: 660
Quote:
the customer has gotten used to it and wants you to do something similar.

DBComboBoxEh looks similar but not identical. Or you need identical?

Quote:
the Customer has to click the button instead of clicking any part of the text to open the Dropdown List, it's another thing for the customer to write something that is not on the list.

You can use OnDropDown, OnCloseUp to remove/restore LimitTextToListValues state.

Code:
procedure TForm2.DBComboBoxEh1CloseUp(Sender: TObject; Accept: Boolean);
begin
  DBComboBoxEh1.LimitTextToListValues := True;
end;

procedure TForm2.DBComboBoxEh1DropDown(Sender: TObject);
begin
  DBComboBoxEh1.LimitTextToListValues := False;
end;

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
PostPosted: 07 May 2022, 11:48 
Offline

Joined: 13 Jul 2019, 19:08
Posts: 88
So I'm sorry if I'm being annoying on this issue.
It's because customers keep asking me.

it doesn't have to be the same as DevExpress just have the same functionality.

Hello I just tested this solution using the "OnDropDown" and "OnCloseUp" Events
however That way I should force the Client to always have to open the DropDown List to be able to locate because otherwise
if I give a Setfocus on the combobox and the client tries to type without clicking with the mouse, he won't be able to find it.

if you could improve "LimitTextToListValues" to be able to do any type of search even with "True" it would be great.

Grateful.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 59 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group