Jump to content

Recommended Posts

Posted

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 ?

Posted
34 minutes ago, andyhill said:

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

Hello Andy,

UniDBLookupComboBox.HideTrigger property? 

Posted

    //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;
 

Posted
56 minutes ago, andyhill said:

//dblComboBoxSuppliers.HideTrigger:= True;  *** HIDES ALL BUTTONS ***

 

2 hours ago, Sherzod said:

Are you adding custom triggers?

 

Posted

This works for me (actually I do it at design time, just used Gexperts to copy component to source hence the With....)

  with UniDBLookupComboBox1.Triggers.Add do begin 
    ButtonId := 0;
    IconCls := 'x-form-search-trigger';
  end;
 

Posted

Thanks David 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.

Posted
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?

Posted
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;

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...