Jump to content

TUniMenuItem does not update icon at runtime


brunomf01

Recommended Posts

Can someone help me with the following problem?
I'm trying to change the image (ImageIndex) of a TUniMenuItem of a TUniPopupMenu but in the TUniMenuButton does not refresh the image ... it is only the default defined ... I want to show the option that was clicked ...
Does anyone know what I might be doing wrong?

Does UniGUI have this limitation of not visually updating ImageIndex?

 

alguem sabe me ajudar com o seguinte problema
Estou tentando mudar a imagem (ImageIndex) de um TUniMenuItem de um TUniPopupMenu mas no TUniMenuButton nao atualiza a imagem... fica só a que foi definida default... estou querendo mostrar a opção que foi clicada, mas a propriedade Checked é meio bugada e pensei implementar assim...
alguem sabe o que posso estar fazendo de errado?

o UniGUI tem essa limitação de não atualizar visualmente o ImageIndex?

 

Ex.:

UniGUI.png

procedure TMainForm.item11Click(Sender: TObject);
begin
  item11.ImageIndex := 0;
  item21.ImageIndex := -1;
  item31.ImageIndex := -1;
end;

procedure TMainForm.item21Click(Sender: TObject);
begin
  item11.ImageIndex := -1;
  item21.ImageIndex := 0;
  item31.ImageIndex := -1;
end;

procedure TMainForm.item31Click(Sender: TObject);
begin
  item11.ImageIndex := -1;
  item21.ImageIndex := -1;
  item31.ImageIndex := 0;
end;

 

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