Jump to content

[SOLVED] UnimSegmentedButton: how to use? / Como usar?


Alessandro

Recommended Posts

Hello!
I would like to know how to use UnimSegmentedButton.
I have 2 buttons within the UnimSegmentedButton, clicking on a run a procedure.
Grateful, thank you.
 
---------------------------------------------------------
 
Olá!
Gostaria de saber como usar o XXXX.
Tenho 2 botões dentro do XXXX, ao clicar em algum executar um procedimento.
Grato, obrigado.

 

Link to comment
Share on other sites

Hi,

 

Try:

procedure TMainmForm.UnimSegmentedButton1Click(Sender: TUnimButtonItem);
begin
  case Sender.ButtonId of
    0: begin

    end;
    1: begin

       end;
    else begin

    end;
  end;
end;

Best regards.

 

Grateful, thank you.  :D 

Link to comment
Share on other sites

  • 2 years later...

Actually the UnimsegmentedButton does not allow clicking the same button again without first unchecking it. With the hint below, I have to double click. How to do this by just clicking once?
  function beforeInit (sender, config)
{
   config.allowDepress = true
}

Link to comment
Share on other sites

4 hours ago, JoaoBosco said:

Actually the UnimsegmentedButton does not allow clicking the same button again without first unchecking it. With the hint below, I have to double click. How to do this by just clicking once?
  function beforeInit (sender, config)
{
   config.allowDepress = true
}

Hello,

Sorry, can you explain your issue?

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 year later...

Good evening, one way to solve it is to create an additional item in a segmented button where visible: = false, and then place the following instruction and thus avoid double clicking

item2 = dummy botton visible:= false

procedure TFLOGINM.action_pruebaExecute(Sender: TObject);
begin

with UnimSegmentedButton1 do
  begin
    Items[2].Pressed := false;
     JSInterface.JSCall('setPressed', [false], Items[2].JSMenuItem);

  end;
end;

Link to comment
Share on other sites

  • 7 months later...

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