Acessar propriedade
17/08/2005
1
Não sei como chama esta funcionalidade, quem souber favor ajuste o título do tópico.
Preciso fazer em BCB o equivalente a [b:db051b3812]TButton(Sender).Text [/b:db051b3812]em Delphi.
Já tentei muitas formas e não consegui. Tem como alguém me ajudar?
Grato,
Rodrigo Cesar
Preciso fazer em BCB o equivalente a [b:db051b3812]TButton(Sender).Text [/b:db051b3812]em Delphi.
Já tentei muitas formas e não consegui. Tem como alguém me ajudar?
Grato,
Rodrigo Cesar
Responder
Posts
05/09/2005
Me desculpem o código é:
TButton(Sender).Caption
Tem muito tempo q deixei de brincar com C/C++, mas veja se isso pode lhe servir de alguma maneira
TButton*Sender->Caption = "Teste";
ou assim, não lembro bem.
Btn = new TButton(this); Btn->Parent = this; Btn->Top = 100; Btn->Width = 120; Btn->Left = 100; Btn->Height = 35; Btn->Caption = "Teste"; Btn->OnClick = BtnClick;
Veja o q pode ser aproveitado daqui.
Responder
05/09/2005
[quote:ecd13a7c43=´rodcesar´]Me desculpem o código é:
TButton(Sender).Caption
Tem muito tempo q deixei de brincar com C/C++, mas veja se isso pode lhe servir de alguma maneira
TButton*(Sender)->Caption = "Teste";
ou assim, não lembro bem.
Btn = new TButton(this); Btn->Parent = this; Btn->Top = 100; Btn->Width = 120; Btn->Left = 100; Btn->Height = 35; Btn->Caption = "Teste"; Btn->OnClick = BtnClick;
Veja o q pode ser aproveitado daqui.[/quote:ecd13a7c43]
Responder
10/10/2005
Na verdade é assim
(TButton*)(Sender)->Caption = "Teste";
Blz, parabéns!!!
Responder
Clique aqui para fazer login e interagir na Comunidade :)