Jump to content

Hide Trigger Button on uniDBEdit When Read Only


Point

Recommended Posts

2 hours ago, Popo said:

I mean, the trigger button on unidbedit should be hidden like the trigger button on unidblookupcombobox when the record status is read only.

This workaround?

UniDBEdit -> 

function afterrender(sender, eOpts) 
{
    sender.setReadOnly(!sender.getEditable());
    Ext.override(sender, {
        setEditable: function() {
            this.setReadOnly(this.getEditable());
            this.callParent(arguments)
        }
    });
}

 

Link to comment
Share on other sites

It's work very well. Thanks you.

but now I have another problem when screen mask enabled to that unidbedit. every time I type a letter in the unidbedit, the screen mask appears. 

Can the screen mask appear only when clicking the trigger button?

FYI, I avoid synchronous mode in my project.

sm_unidbedit_bt.gif

Link to comment
Share on other sites

hi sherzod,

function click(sender, eOpts)
{
   sender.showMask('Loading, Please Wait...');
   ajaxRequest(sender, 'test');
}


procedure TMainForm.UniDBEdit1AjaxEvent(Sender: TComponent; EventName: string;
  Params: TUniStrings);
begin
  if EventName='test' then
  begin
    Sleep(1000);
  end;
end;

That code show mask but not only button trigger, could you help me

Link to comment
Share on other sites

 

1 hour ago, Sherzod said:

Hi,

In the test case, I don't see this behavior.

in the previous test case i am not enabled screen mask yet.

and then I enable it, hope screen mask appears when I click the trigger button.
but screen mask appear everytime I type in the unidbedit.

Link to comment
Share on other sites

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