Jump to content

Recommended Posts

Posted
10 minutes ago, eduardosuruagy said:

How do I make a Panel invisible by clicking a button on the client side

Why not use the server side for this?

Posted
16 minutes ago, Sherzod said:

Bem, se você não levar em consideração o status do painel no lado do servidor, sim, poderá usar a operação no lado do cliente.

I have a panel that has a width of zero 0, then I click the button and change the size to 300, all on the server side, but sometimes there is a delay in this process. Then I was wondering if you can do it on the client's side, or making it visible and invisible or changing its size.

Posted
procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  UniButton1.JSInterface.JSAddListener('click', 'function(){'+ UniPanel1.JSName +'.hide()}');
end;

 

Posted
1 hour ago, Sherzod said:

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  UniButton1.JSInterface.JSAddListener('click', 'function(){'+ UniPanel1.JSName +'.hide()}');
end;

 

and to make it visible?

Posted
procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  UniButton1.JSInterface.JSAddListener(
     'click', 
     'function(){'+ 
        UniPanel1.JSName +'.setVisible(!'+ UniPanel1.JSName +'.isVisible())'+
     '}'
  );
end;

i think you want to create a switch between visible and invisible

  • Like 1
Posted
11 minutes ago, gerardocrisci said:

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  UniButton1.JSInterface.JSAddListener(
     'click', 
     'function(){'+ 
        UniPanel1.JSName +'.setVisible(!'+ UniPanel1.JSName +'.isVisible())'+
     '}'
  );
end;

i think you want to create a switch between visible and invisible

That's right

Posted
16 minutes ago, gerardocrisci said:

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
  UniButton1.JSInterface.JSAddListener(
     'click', 
     'function(){'+ 
        UniPanel1.JSName +'.setVisible(!'+ UniPanel1.JSName +'.isVisible())'+
     '}'
  );
end;

i think you want to create a switch between visible and invisible

Thank you very much!!

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