Jump to content

Bir Butona Farklı Görev


korasoglu
 Share

Recommended Posts

arkadaşlar ben daha önce bir butona iki görev atama gördüm şöyleydi

Global Functions evresine;nSayi = 0;
Button On Click evresine;

if nSayi == 0 then
nSayi = 1;
Dialog.Message("mesaj", "bu 1. tıklamanız") -- 1. işlem
else
nSayi = 0;
Dialog.Message("mesaj", "bu 2. tıklamanız") -- 2. işlem
end

===================
ben şöyle yaptım



if nSayi == 0 then
nSayi = 1;
Button.SetVisible("Button1", false)
Button.SetVisible("Button2", false)
Button.SetVisible("Button3", false)
Button.SetVisible("Button4", false)
Image.SetVisible("ustbeyaz", false)
Image.SetVisible("altmavi", true)
else
nSayi = 0;
Button.SetVisible("Button1", true)
Button.SetVisible("Button2", true)
Button.SetVisible("Button3", true)
Button.SetVisible("Button4", true)
Image.SetVisible("ustbeyaz", true)
Image.SetVisible("altmavi", false)
end

ikici bir butonada iki görev atadığım zaman

if nSayi == 2 then
nSayi = 1;
CheckBox.SetVisible("CheckBox1", false)
CheckBox.SetVisible("CheckBox2", false)
CheckBox.SetVisible("CheckBox3", false)
CheckBox.SetVisible("CheckBox4", false)
CheckBox.SetVisible("CheckBox5", false)
CheckBox.SetVisible("CheckBox6", false)
Image.SetVisible("ustbeyaz", false)
Image.SetVisible("altmavi", true)
else
nSayi = 2;
CheckBox.SetVisible("CheckBox1", true)
CheckBox.SetVisible("CheckBox2", true)
CheckBox.SetVisible("CheckBox3", true)
CheckBox.SetVisible("CheckBox4", true)
CheckBox.SetVisible("CheckBox5", true)
CheckBox.SetVisible("CheckBox6", true)
Image.SetVisible("ustbeyaz", true)
Image.SetVisible("altmavi", false)
end

iki butona tıklamış gibi görev yapıyor
yani ben button1 tıkladıysam hangi görevi verdiysem onu button2 ye hangi görevi atadıysam onu yapsın bu konuda yardımlarınızı bekliyorum

Birde
hepsini seç
tersine çevir
seçimi kaldır
klavyeden seç nasıl olur yardımlarınızı bekliyorum
(benim elimde şunlar var
for a=1, 20 do
CheckBox.SetChecked("CheckBox" .. a, true);
end

==================
cKontrol = CheckBox.GetChecked(this)
if cKontrol == true then
CheckBox.SetChecked("CheckBox1", true)
CheckBox.SetChecked("CheckBox2", true)
CheckBox.SetChecked("CheckBox3", true)
else
CheckBox.SetChecked("CheckBox1", false)
CheckBox.SetChecked("CheckBox2", false)
CheckBox.SetChecked("CheckBox3", false)
end

==============
tuşla seçin
========
sayfa ayarları on key
=====================
if e_Key == 83 then
CheckBox.SetChecked("CheckBox1", true)
CheckBox.SetChecked("CheckBox2", true)
CheckBox.SetChecked("CheckBox3", true)
CheckBox.SetChecked("CheckBox4", true)
if e_Key == 83 then
CheckBox.SetChecked("CheckBox1", false)
CheckBox.SetChecked("CheckBox2", false)
CheckBox.SetChecked("CheckBox3", false)
CheckBox.SetChecked("CheckBox4", false)
end
end
==============================
hangileri seçilecekse buton on clik yaz
CheckBox.SetChecked("CheckBox1", true)
CheckBox.SetChecked("CheckBox3", true)
bir türlü olmuyor) Edited by korasoglu
Link to comment
Share on other sites

Global Func.'a [b]nButtonClick = 0[/b] ekle.

İkinci butonu aşağıdakiler ile değiştir.

[php]if nButtonClick == 0 then
nButtonClick = 1;
CheckBox.SetVisible("CheckBox1", false)
CheckBox.SetVisible("CheckBox2", false)
CheckBox.SetVisible("CheckBox3", false)
CheckBox.SetVisible("CheckBox4", false)
CheckBox.SetVisible("CheckBox5", false)
CheckBox.SetVisible("CheckBox6", false)
Image.SetVisible("ustbeyaz", false)
Image.SetVisible("altmavi", true)
else
nButtonClick = 0;
CheckBox.SetVisible("CheckBox1", true)
CheckBox.SetVisible("CheckBox2", true)
CheckBox.SetVisible("CheckBox3", true)
CheckBox.SetVisible("CheckBox4", true)
CheckBox.SetVisible("CheckBox5", true)
CheckBox.SetVisible("CheckBox6", true)
Image.SetVisible("ustbeyaz", true)
Image.SetVisible("altmavi", false)
end[/php]

Edited by djonur007
Link to comment
Share on other sites

sevgili djonur007 dediğini uyguladım sonuç aynı
hangi butona basarsam basıyım ikiside ortak yazdığım ne varsa onları gösterip gizliyor.

====== Düzeltiyorum işlem tamam sorun çözüldü ==========

hepsini seç kaldır öner kurulum gibi kodları paylaşırsanız sevinirim

Edited by korasoglu
Link to comment
Share on other sites

Ya arkadaşım nasıl sonuç aynı deneyipte yazıyoruz herhalde!

Bir kere nSayi == 2 böle bir tanımlama yapamazsın yanlış olur. Çünkü nSayi değerini hiçbir zaman 2 yapmyorsun. Dediğim gibi yapman gerek!.

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.
Note: Your post will require moderator approval before it will be visible.

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.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...