bu butonlardan herhangi birine tıklandığında kartın içindeki kelimlerin güncellenmesini istiyorum bunu nasıl yapabilirim?
var
HomePage : TclStyleForm;
cardPanel : TClProPanel;
lblEng, lblTr : TclProLabel;
lblScore : TCLLabel;
btnLeft, btnRight : TClProButton;
counter : Integer;
//Kart Yapısı.
void createCard(wordEng : String; wordTr : String);
{
cardPanel = HomePage.AddNewProPanel(HomePage,'cardPanel');
clComponent.SetupComponent(cardPanel,
'{"Align" : "alNone",
"Width" : 200,
"Height" : 190,
"RoundHeight" : 35,
"MarginBottom" : 100,
"RoundWidth" : 35,
"BorderWidth" : 1,
"BackgroundColor" : "#1499db",
"BorderColor" : "#1499db"}'); //Gri
lblEng = HomePage.AddNewProLabel(cardPanel, 'lblEng', 'wordEng');
lblEng.Text = wordEng;
clComponent.SetupComponent(lblEng,'{
"TextColor" : "ffffff",
"TextSize" : 25,
"Height" : 50,
"TextBold" : "Yes",
"TextVerticalAlign" : "Center",
"TextHorizontalAlign" : "Center"
}');
lblEng.Align = alTop;
lblTr = HomePage.AddNewProLabel(cardPanel, 'lblTr', 'wordTr');
clComponent.SetupComponent(lblTr,'{
"TextColor" : "000000",
"TextSize" : 18,
"Height" : 50,
"TextVerticalAlign" : "Center",
"TextHorizontalAlign" : "Center"
}');
lblTr.Align = alBottom;
lblTr.Margins.Bottom = 50;
lblTr.Text = wordTr;
}
void createVisibleBtn
{
btnRight = HomePage.AddNewProButton(HomePage, 'btnRight', '');
clComponent.SetupComponent(btnRight, '{
"Width": 90,
"Height": 150,
"BackgroundColor": "#1499db",
"TextColor": "#1499db"}');
btnRight.Align = alRight;
btnRight.Opacity = 0; // buton görünmez
btnLeft = HomePage.AddNewProButton(HomePage, 'btnLeft', '');
clComponent.SetupComponent(btnLeft, '{
"Width": 90,
"Height": 150,
"BackgroundColor": "#1499db",
"TextColor": "#1499db"}');
btnLeft.Align = alLeft;
btnLeft.Opacity = 0;
}
void BtnLeftClick;
{
//ShowMessage('Sol butona tıkladınız');
Dec(counter);
lblScore.Text = 'Skorunuz : ' + IntToStr(counter);
}
void BtnRightClick;
{
//ShowMessage('Sağ butona tıkladınız.');
Inc(counter);
lblScore.Text = 'Skorunuz : ' + IntToStr(counter);
}
{
counter = 0;
HomePage = TclStyleForm.Create(Self);
HomePage.SetFormColor('#292929', '#292929', clGNone);
//Sol Üst Skor Labelı
lblScore = HomePage.AddNewLabel(HomePage, 'lblScore', '--');
lblScore.Align = alMostTop;
lblScore.Height = 20;
lblScore.Margins.Left = 20;
createCard('Example','Örnek');
createVisibleBtn();
HomePage.AddNewEvent(btnRight, tbeOnClick, 'BtnRightClick');
HomePage.AddNewEvent(btnLeft, tbeOnClick, 'BtnLeftClick');
HomePage.Run;
}