x_files_x Posted July 6, 2013 Share Posted July 6, 2013 (edited) Mrb arkadaşlar geçenlerde bişi aklıma geldi dedim yapar mıyım, şöyle bişi yapmak istedim: Gui nin ekle ve çıkart butonlar ıvar, comboya bişi yazıp eklersek listeye eklicek, cıkart dersekte cıkartıcak ve ayrıca comboya yazdıgım isim listede var ise onu bulucak, bir çeşit müşteri ekleme çıkart bulma programı gibi bişi, bana cok lazım oldugundan degil ama öğrenmek adına uğraşıyorum örnek gui burda ama sadece temayı tasarladım pek komutları yapamadım #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <GuiListBox.au3> #include <GuiListView.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Global $Dosya = "C:\WINDOWS\Entegrasyon.ini" Global $MusteriData = StringStripWS(IniRead($Dosya,"Data","Musteri",""), 3) $Form1_1 = GUICreate("Form1", 405, 334, 190, 126) GUISetBkColor(0x9DB9EB) $musteri = GUICtrlCreateCombo("Combo1", 24, 32, 265, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) ;~ GUICtrlSetData(-1,$MusteriData ,"") GUICtrlSetColor(-1, 0x800080) $Group1 = GUICtrlCreateGroup("Group1", 8, 8, 297, 65) GUICtrlCreateGroup("", -99, -99, 1, 1) $musteri_btn2 = GUICtrlCreateButton("Ekle", 320, 24, 59, 17) $musteri_btn1 = GUICtrlCreateButton("Çıkart", 320, 48, 59, 17) $Group2 = GUICtrlCreateGroup("", 312, 8, 81, 65) GUICtrlCreateGroup("", -99, -99, 1, 1) Global $Items = GUICtrlCreateList("", 8, 80, 297, 240) Global $Items = $MusteriData, $Items_S = StringSplit($Items, "|") GUICtrlSetData(-1, $Items) $Pic1 = GUICtrlCreatePic(@ScriptDir & "/script.jpg", 312, 80, 84, 244) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Edited July 6, 2013 by x_files_x Quote Link to comment Share on other sites More sharing options...
reyiz Posted July 6, 2013 Share Posted July 6, 2013 Üst kısımda sadece ekleme bölümü olsa, listeden bir öge seçip silme ve düzenleme işlevi olsa daha iyi olur. Hem liste hem combobox kullanıp işi uzatmaya gerek yok. Resimdeki gibi: Quote Link to comment Share on other sites More sharing options...
TeYyArEe Posted July 6, 2013 Share Posted July 6, 2013 [warning][color=#FF0000][b]DİKKAT: Konu Başlığını forum Kurallarına gore yeniden düzenleyiniz. Aksi halde cope tasınacaktır. [topic=872]Forum Kuralları[/topic] - [ Madde 10-16 ]Konu düzenlenene kadar yazılan tüm iletiler silinecek, ileti yazanlar uyarı alacaktır.[/b][/color][/warning] Quote Link to comment Share on other sites More sharing options...
x_files_x Posted July 6, 2013 Author Share Posted July 6, 2013 @Reyiz kardeş peki öyle yapayımda kodlarda yardım eder misin, ben yapamadım, scripti, nasıl ekletip cıkartıcam filan olmadı Quote Link to comment Share on other sites More sharing options...
x_files_x Posted July 6, 2013 Author Share Posted July 6, 2013 @Teyyare kardeş peki öyle yapayımda kodlarda yardım eder misin, ben yapamadım, scripti, nasıl ekletip cıkartcam filan olmadı Quote Link to comment Share on other sites More sharing options...
x_files_x Posted July 6, 2013 Author Share Posted July 6, 2013 Konu başlığını nasıl düzenlicem bilmiyorum ki Quote Link to comment Share on other sites More sharing options...
reyiz Posted July 6, 2013 Share Posted July 6, 2013 (edited) Bir örnek hazırladım. Gerekli değişiklikleri yaparak soyad, yaş gibi kısımlar ekleyebilirsiniz. [spoiler] #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=C:\Users\Admin\Desktop\Form1_1.kxf $Form1_1 = GUICreate("Form1", 406, 335, 238, 159) GUISetBkColor(0x9DB9EB) $Group1 = GUICtrlCreateGroup("Kayıt", 8, 8, 385, 65) $Input1 = GUICtrlCreateInput("Input1", 104, 32, 241, 21) $Label1 = GUICtrlCreateLabel("Adı ve Soyadı:", 24, 32, 72, 17) $Button1 = GUICtrlCreateButton("+", 352, 32, 25, 25) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group2 = GUICtrlCreateGroup("", 312, 88, 81, 65) $musteri_btn2 = GUICtrlCreateButton("Düzenle", 320, 104, 59, 17) $musteri_btn1 = GUICtrlCreateButton("Sil", 320, 128, 59, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Items = GUICtrlCreateList("", 8, 88, 297, 240) GuiCtrlSetData(-1, IniRead(@AppDataDir & "\kisiler.ini", "kullanıcılar", "adlar", "")) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Func _ReadItems() Local $iCnt = _GUICtrlListBox_GetCount($Items) Local $sMsg = "" For $n = 0 To $iCnt - 1 $sMsg &= _GUICtrlListBox_GetText($Items, $n) & "|" Next Return $sMsg EndFunc While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 If Not StringInStr(IniRead(@AppDataDir & "\kisiler.ini", "kullanıcılar", "adlar", "") & "|", GUICtrlRead($Input1)) Then IniWrite(@AppDataDir & "\kisiler.ini", "kullanıcılar", "adlar", _ReadItems() & GUICtrlRead($Input1)) EndIf GuiCtrlSetData($Items, "") GuiCtrlSetData($Items, IniRead(@AppDataDir & "\kisiler.ini", "kullanıcılar", "adlar", "")) EndSwitch WEnd [/spoiler] Edited July 7, 2013 by reyiz Quote Link to comment Share on other sites More sharing options...
x_files_x Posted July 7, 2013 Author Share Posted July 7, 2013 Tşk ederim Reyiz, işimi gördü 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.