Jump to content

how disable expand unipanel


SayeyeZohor

Recommended Posts

1 hour ago, SayeyeZohor said:

I Want disable the ability to expand the unipanel ;)

and always be collapsed

Ok...

Try this approach.

1. UniPanel1.Collapsible/Collapsed = True

2. UniPanel1.ClientEvents.ExtEvents -> function beforeexpand:

function beforeexpand(p, animate, eOpts)
{
    return this.allowExpand;
}

3. MainForm.OnCreate:

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  UniPanel1.JSInterface.JSAssign('allowExpand', [False]);
end;

4. If you want to expand:

procedure TMainForm.UniButton1Click(Sender: TObject);
begin
  UniPanel1.JSInterface.JSAssign('allowExpand', [True]);
end;

 

  • Like 1
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...