Jump to content

Seçilen CheckBoxa Özellik Verme


casira

Recommended Posts

Şöyle bir sorunum var.

sec = CheckBox.GetChecked("CheckBox4");

if sec ~= true then

CheckBox.SetChecked("CheckBox4", true);

else

if sec ~= false then

CheckBox.SetChecked("CheckBox4", false)

end

end

sayfada birkaç checkbox var bunları tümünü seç ve önerilen seçimde kalın italik yapabiliyorum.Fakat tersini seç dediğimde seçtirebiliyorum ama checkbox normal kalıyor yani tersini seçiyor ama kalın italik olmuyor.

Link to comment
Share on other sites

-- checkbox metnini kalin ve italik yap
ayar1 = {};
ayar1.FontWeight = FW_BOLD;
ayar1.FontItalic = true;

-- checkbox metnini normal yap
ayar2 = {};
ayar2.FontWeight = FW_NORMAL;
ayar2.FontItalic = false;

sec = CheckBox.GetChecked("CheckBox4");
if sec ~= true then
CheckBox.SetChecked("CheckBox4", true);
CheckBox.SetProperties("CheckBox4", ayar1)
else
CheckBox.SetChecked("CheckBox4", false)
CheckBox.SetProperties("CheckBox4", ayar2)
end[/CODE]

Bu kodlarla yapabilirsin. Ayrıca iki kere if kullanmana gerek yok. il başta sec ~= true demişsin yani sec true değilse. else dediğin zaman zaten tam tersini yapacaktır. O yüzden ikinci if döngüsünü kaldırdım.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...