Jump to content

buton ve label font rengi bir değişkenin değerine göre nasıl değişir?


Bektas

Recommended Posts

bir  global sayi(integer) değişkenim var. Sayi değişince,  buton1 ve label1  objelerin renginin, değişmesini istiyorum.

sayi=1 olunca kırmızı buton rengi 

sayi=0 olunca gri buton rengi

bu işlem delphi kodları ile nasıl yapılır? 

bu işlem javascript fonksiyonu ile nasıl yapılır?

Version:1.90.0 build 1547 kullanıyorum.

Teşekkürler

 

Link to comment
Share on other sites

  • Bektas changed the title to buton ve label font rengi bir değişkenin değerine göre nasıl değişir?
1 hour ago, Hayri ASLAN said:

Merhaba

Client tarafindan bir istek gelmedigi surece, client tarafini degistiremezsiniz.

Onerim bir unitimer koyup bunu kontrol etmeniz.

Client tarafı  değişimi istemiyorum client tarafı global değişkenim durumuna göre buton rengini gösterecek.   

Link to comment
Share on other sites

  • 2 weeks later...

if Sayi =1 then label1.color:=clred;

butonlarda tema olduğu için javascript ile yapmanız gerekir

servermodule.Customcss 

.btnyesil
{
 background:#009900; !important;
 color:#009900 !important;
 -webkit-transition: background 0.5s ease-in-out;
 transition: background 0.5s ease-in-out;
}

.btnkirmizi
{
 background:#CC3300; !important;
 color:#660000 !important;
 -webkit-transition: background 0.5s ease-in-out;
 transition: background 0.5s ease-in-out;
}

 

if Sayi=2 then button1.ClientEvents.ExtEvents.values['added'] := 'function added(sender, container, pos, eOpts) {sender.addCls("btnkirmizi");}';

 

 

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