Acessar propriedade
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
Rodcesar
Curtidas 0
Respostas
Rodcesar
17/08/2005
Me desculpem o código é:
TButton(Sender).Caption
GOSTEI 0
Rjun
17/08/2005
Ja tentou assim:
((TButton)sender).Caption
GOSTEI 0
Rodcesar
17/08/2005
Já, mas não funcionou.
GOSTEI 0
Martins
17/08/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.
GOSTEI 0
Martins
17/08/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]
GOSTEI 0
Rodcesar
17/08/2005
Na verdade é assim
(TButton*)(Sender)->Caption = "Teste";
GOSTEI 0
Martins
17/08/2005
Na verdade é assim
(TButton*)(Sender)->Caption = "Teste";
Blz, parabéns!!!
GOSTEI 0