Jump to content

TUniDBLookupComboBox - hide unused DropDown button


andyhill

Recommended Posts

I have a TUniDBLookupComboBox and I want to Hide DropDownTriggerButton (keep MagnifierLookUpTriggerButton)

    dblComboBoxSuppliers.ClientEvents.UniEvents.Clear;
    s:= 'beforeInit=function beforeInit(sender, config) '+
        '{ '+
        '  Triggers[0].hide(); '+
        '} ';
    dblComboBoxSuppliers.ClientEvents.Add(s);

Code above executes but does not hide button ?

Link to comment
Share on other sites

    //dblComboBoxSuppliers.HideTrigger:= True;  *** HIDES ALL BUTTONS ***
    dblComboBoxSuppliers.ListSource:= UniMainModule.dsSuppliersLkUp;
    dblComboBoxSuppliers.GridMode:= lgmPostListValue;   // lgmPostListValue, lgmPostKeyValue
    dblComboBoxSuppliers.ListOnlyMode:= lmFollowSource; // lmNoFollow, lmFollowSource (uniDBLookupHelper.pas)
    dblComboBoxSuppliers.ListField:=  'BusinessName';
    dblComboBoxSuppliers.KeyField:=   'BusinessName';
    dblComboBoxSuppliers.EndUpdate;
    UniMainModule.tblSuppliersLkUp.ReadOnly:= True;
    UniMainModule.tblSuppliersLkUp.Open;
 

Link to comment
Share on other sites

21 minutes ago, andyhill said:

but the buttons are already there, I wanted to remove one. I could of course remove all and then add but it is clearly a bug.

Andy, 

Sorry, seems I don't understand your case.

Can you make a simple app to check?

Link to comment
Share on other sites

2 hours ago, andyhill said:

I wanted...

Maybe you wanted this:

procedure TMainForm.UniButton1Click(Sender: TObject);
begin
  UniDBLookupComboBox1.JSInterface.JSCall('getTriggers().t1.setVisible', [False]); //t1, t2, t3, ...
end;

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...