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.

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...