NeoDark Posted August 9, 2013 Share Posted August 9, 2013 (edited) Merhaba arkadaşlar.Yapmak istediğim şeyleri sırayla izah etmek istiyorum. Şimdi bu gördüğünüz Dialog1 sayfası.Ben burada input'tan aldığım veriyi Ekle butonuna bastığımda Page1'deki ComboBox'a eklenesini istiyorum.Yazdığım kod bu fakat çalışmadı. result = Input.GetText("Input1") result2 = ComboBox.AddItem("ComboBox1", "result", "") DialogEx.Close(this) Yardımlarınız için şimdiden teşekkürler. Edit:Arkadaşlar yapmak istediğim daha anlaşılır olsun diye apz dosyasını paylaşıyorum. http://www.mediafire.com/download/gnpd5tcnn1vy907/Devams%C4%B1zl%C4%B1k_10.08.apz Edit 2 >> Yardımların uygulanmış haldeki apz dosyası.Itemler için int değişken ayarlanmadı. http://www.mediafire.com/?z3c49uwemi5l24c Edited August 10, 2013 by NeoDark Quote Link to comment Share on other sites More sharing options...
nightmare3519 Posted August 9, 2013 Share Posted August 9, 2013 ini dosyasından yardım alabilrsin çok işine yarar Quote Link to comment Share on other sites More sharing options...
NeoDark Posted August 9, 2013 Author Share Posted August 9, 2013 ini tam nedir bilmiyorum.Eğer vaktin varsa apz dosyasını ekledim,ne yapmak istediğimi daha kolay anlarsın. Quote Link to comment Share on other sites More sharing options...
xarax Posted August 9, 2013 Share Posted August 9, 2013 (edited) Yazdığın kodlarda 2 .satırda hatan var fazla tırnak kullanmışsın. Üstelik ComboBox1 nesnesi Dialog üzerinde değil Page1 üzerinde. Önerim; DialogEx.Show ile açınca Input'a girilen değer Ekle butonuna tıkladığında bir değişkene atansın. tempstring = Input.GetText..... gibi Dialog kapanınca DialogEx.Show kodundan sonra ComboBox ekleme yaptır. ComboBox.AddItem("ComboBox1", tempstring, "") gbi Al sana yapılmışı https://dl.shared.com/3es3bicpmx Not: Veriler kaydedilecekse ini dosyasına yazdırmak daha iyi olur. Edited August 9, 2013 by xarax Quote Link to comment Share on other sites More sharing options...
NeoDark Posted August 9, 2013 Author Share Posted August 9, 2013 (edited) Cansın :) Proje dosyasında .ini dosyası yok ,bunu nasıl sağlayacağım ? Edit >> Cd_Root içinde combobox.ini oluşturdum.Şu komut ile içine veri yazdım INIFile.SetValue("combobox.ini", "My Section", "My Value", "My Data"); Edited August 9, 2013 by NeoDark Quote Link to comment Share on other sites More sharing options...
xarax Posted August 9, 2013 Share Posted August 9, 2013 Cansın :) Bunların nasıl kalıcı olmasını sağlarım ? https://dl.shared.com/nskl66n4o4 Quote Link to comment Share on other sites More sharing options...
NeoDark Posted August 10, 2013 Author Share Posted August 10, 2013 (edited) ComboBox'ta seçili olan itemi silmek istiyorum ama yapamadım.Bende şu komut ile combobox ı resetliyorum ama data.ini değişmiyor. ComboBox.ResetContent("ComboBox1"); Edited August 10, 2013 by NeoDark Quote Link to comment Share on other sites More sharing options...
Kral__ Posted August 10, 2013 Share Posted August 10, 2013 page e bir buton eklersin bu komutu on clicke koyarsın dialogtanda page.objectclick yaptırırsın bide böyle dene.. Quote Link to comment Share on other sites More sharing options...
NeoDark Posted August 10, 2013 Author Share Posted August 10, 2013 (edited) Zaten silmek için bir buton ekliyorum.ComboBox'tan item silip, resetleyebiliyorum.Ama ini dosyası değişmiyor.Apz dosyası konuda var ona bakabilirsen ne yapmak istediğimi daha iyi anlayabilirsin. Edited August 10, 2013 by NeoDark Quote Link to comment Share on other sites More sharing options...
Kral__ Posted August 10, 2013 Share Posted August 10, 2013 (edited) Pardon :D hemen düzenliyorum.... Edited August 10, 2013 by Kral__ Quote Link to comment Share on other sites More sharing options...
HalilYanar Posted August 10, 2013 Share Posted August 10, 2013 (edited) Bak şimdi olay şöyle olucak ; Global Fuctions nBox = ""; nSec =""; On Show Page.StartTimer(100); On Timer if nBox == "1" then ComboBox.AddItem("ComboBox1", nSec, ""); nBox=="0"; else -- Anlamsız burası :) end DialogEx'deki Ekle Butonu nSec = Input.GetText("Input1"); nBox=="1"; DialogEx.Close(); Edited August 10, 2013 by HalilYanar Quote Link to comment Share on other sites More sharing options...
NeoDark Posted August 10, 2013 Author Share Posted August 10, 2013 (edited) Evet Ders Çıkar'a bastığımda o an combobox'ta görünen itemi silmek istiyorum hemde data.ini dosyasından. Edit >> HalilYanar hemen deniyorum. Edit 2>> Senin verdiğin kodları ben tam çözemedim item mi ekliyoruz ? Edited August 10, 2013 by NeoDark Quote Link to comment Share on other sites More sharing options...
HalilYanar Posted August 10, 2013 Share Posted August 10, 2013 (edited) Evet :) EDİT = Bu arada yanımda AMS yok o yüzden kapsamlı yardım edemiyorum aklımda kaldığı kadar :D Edited August 10, 2013 by HalilYanar Quote Link to comment Share on other sites More sharing options...
Kral__ Posted August 10, 2013 Share Posted August 10, 2013 (edited) Global; function init() ComboBox.ResetContent("ComboBox1"); nSay = INIFile.GetValue("AutoPlay\\Docs\\Data.ini", "Adet", "Say"); for i = 1, nSay, 1 do Ders = INIFile.GetValue("AutoPlay\\Docs\\Data.ini", "Ders", i); if Ders ~= "" then ComboBox.AddItem("ComboBox1", Ders, i) end end end Page.OnShow; init() Ders Çıkar.OnClick; nSec = ComboBox.GetSelected("ComboBox1"); nValue = ComboBox.GetItemData("ComboBox1", nSec); INIFile.DeleteValue("AutoPlay\\Docs\\Data.ini", "Ders", nValue); init() Ders Ekle.On Click; DialogEx.Show("Dialog1") nSay = INIFile.GetValue("AutoPlay\\Docs\\Data.ini", "Adet", "Say"); INIFile.SetValue("AutoPlay\\Docs\\Data.ini", "Adet", "Say", nSay+1); INIFile.SetValue("AutoPlay\\Docs\\Data.ini", "Ders", nSay+1, tempstring); init() İni; [Adet] Say=4 [Ders] 1=Ams 2=C++ 3=Delphi 4=Woky Dene bakalım :) On Shoutdowndaki kodları sil ----Edit Dialogtaki iptal butonunun kodlarını yazmamışsın onlarıda veriyimmi ? dialogtan çıkınca hata verio.. Edited August 10, 2013 by Kral__ Quote Link to comment Share on other sites More sharing options...
NeoDark Posted August 10, 2013 Author Share Posted August 10, 2013 Glabal'de 5. satırda hata var diyor.limit sayı olmalı diyor.nSay da hata ders eklerken de hata aldım :S Quote Link to comment Share on other sites More sharing options...
Kral__ Posted August 10, 2013 Share Posted August 10, 2013 Ben en iyisi apz veriyim 1 dk.. Quote Link to comment Share on other sites More sharing options...
DivaneTR Posted August 10, 2013 Share Posted August 10, 2013 Glabal'de 5. satırda hata var diyor.limit sayı olmalı diyor.nSay da hata ders eklerken de hata aldım :S Hata vermesi çok doğal, string olan returnu number olarak değerlendirmeye çalışmış arkadaş. Quote Link to comment Share on other sites More sharing options...
Kral__ Posted August 10, 2013 Share Posted August 10, 2013 http://www.mediafire.com/?t94xgqy8weooy8t Bende hiç bir sorun çıkmıyor :D Quote Link to comment Share on other sites More sharing options...
HalilYanar Posted August 10, 2013 Share Posted August 10, 2013 Hata vermesi çok doğal, string olan returnu number olarak değerlendirmeye çalışmış arkadaş. Hayranım bu adama ya :D Quote Link to comment Share on other sites More sharing options...
DivaneTR Posted August 10, 2013 Share Posted August 10, 2013 Çıkar çıkar merak etme, ayrıca döngüde step olarak 1 tanımlamadan da ayrı bir saçmalık. Zaten varsayılan step 1 olduğu için 1 yazılmaz. Quote Link to comment Share on other sites More sharing options...
NeoDark Posted August 10, 2013 Author Share Posted August 10, 2013 Kral__ tamda istediğim gibi çalışıyor, çok sağ ol.Ben şimdi kodları analiz edip anlamaya çalışayım.Sıra geldi seçili olan ders için bir int değişken tutup bunu arttırıp azaltabilmekte. Quote Link to comment Share on other sites More sharing options...
NeoDark Posted August 10, 2013 Author Share Posted August 10, 2013 Arkadaşlar peki bu çalışmamda ComboBox da bir itemi seçtiğimde sadace o seçeneğe özgü olan bir int değişkeni nasıl tutarım ? Quote Link to comment Share on other sites More sharing options...
DivaneTR Posted August 10, 2013 Share Posted August 10, 2013 Globalde tutabilirsin, sonra istediğin yerde kullanırsın. Quote Link to comment Share on other sites More sharing options...
NeoDark Posted August 10, 2013 Author Share Posted August 10, 2013 Ama ben her item için ayrı değişken yapmak istiyorum.Mesela 4. itemi seçti ,ona bağlı değişkendeki değer label'a yazıcak.Kullanıcı arttır butonuna bastığında bu değer değişicek. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.