Jump to content

Butonlara Görev Verme


Mycrosoft
 Share

Recommended Posts

Bunun gibi bir tasarım yaptım ve kodlama kısmında sorun yaşıyorum:
[code]#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 458, 420, 195, 145)
$Group1 = GUICtrlCreateGroup("Web Tarayıcı", 24, 24, 193, 153)
$Radio1 = GUICtrlCreateRadio("Mozilla Firefox [Önerilir]", 34, 140, 169, 17)
$Radio2 = GUICtrlCreateRadio("Google Chrome", 34, 108, 113, 17)
$Radio3 = GUICtrlCreateRadio("Internet Explorer 9", 34, 76, 113, 17)
$Radio4 = GUICtrlCreateRadio("Internet Explorer 8", 34, 44, 113, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("Seçimimi Uygula", 24, 368, 411, 25, 0)
$Group2 = GUICtrlCreateGroup("Ofis Yazılımı", 24, 192, 193, 153)
$Radio5 = GUICtrlCreateRadio("Office 2003", 32, 216, 113, 17)
$Radio6 = GUICtrlCreateRadio("Office 2007", 32, 248, 113, 17)
$Radio7 = GUICtrlCreateRadio("Office 2010", 32, 280, 113, 17)
$Radio8 = GUICtrlCreateRadio("Open Office [Önerilir]", 32, 312, 169, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group3 = GUICtrlCreateGroup("Sistem Araçları", 240, 24, 193, 153)
$Radio9 = GUICtrlCreateRadio("7-Zip [Önerilir]", 248, 48, 113, 17)
$Radio10 = GUICtrlCreateRadio("WinRAR", 248, 80, 113, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group4 = GUICtrlCreateGroup("Oyunlar", 240, 192, 193, 153)
$Radio11 = GUICtrlCreateRadio("Küçük Oyunlar", 248, 216, 113, 17)
$Radio12 = GUICtrlCreateRadio("Oyun 1", 248, 248, 113, 17)
$Radio13 = GUICtrlCreateRadio("Oyun 2", 248, 280, 113, 17)
$Radio14 = GUICtrlCreateRadio("Oyun 3", 248, 312, 113, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

EndSwitch
WEnd
[/code]

Her kategoride sadece 1 seçim yapılabilecek ve seçimimi uygula dediğimde bunları sırayla yükleyecek. Böyle bir şey mümkün mü?
Link to comment
Share on other sites

Hani radionun seçili olduğunu bulmak için GuictrlRead ile okutmalısın!
[codebox]
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 458, 420, 195, 145)
$Group1 = GUICtrlCreateGroup("Web Tarayıcı", 24, 24, 193, 153)
$Radio1 = GUICtrlCreateRadio("Mozilla Firefox [Önerilir]", 34, 140, 169, 17)
GUICtrlSetState(-1,1)
$Radio2 = GUICtrlCreateRadio("Google Chrome", 34, 108, 113, 17)
$Radio3 = GUICtrlCreateRadio("Internet Explorer 9", 34, 76, 113, 17)
$Radio4 = GUICtrlCreateRadio("Internet Explorer 8", 34, 44, 113, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("Seçimimi Uygula", 24, 368, 411, 25, 0)
$Group2 = GUICtrlCreateGroup("Ofis Yazılımı", 24, 192, 193, 153)
$Radio5 = GUICtrlCreateRadio("Office 2003", 32, 216, 113, 17)
$Radio6 = GUICtrlCreateRadio("Office 2007", 32, 248, 113, 17)
$Radio7 = GUICtrlCreateRadio("Office 2010", 32, 280, 113, 17)
$Radio8 = GUICtrlCreateRadio("Open Office [Önerilir]", 32, 312, 169, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group3 = GUICtrlCreateGroup("Sistem Araçları", 240, 24, 193, 153)
$Radio9 = GUICtrlCreateRadio("7-Zip [Önerilir]", 248, 48, 113, 17)
$Radio10 = GUICtrlCreateRadio("WinRAR", 248, 80, 113, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group4 = GUICtrlCreateGroup("Oyunlar", 240, 192, 193, 153)
$Radio11 = GUICtrlCreateRadio("Küçük Oyunlar", 248, 216, 113, 17)
$Radio12 = GUICtrlCreateRadio("Oyun 1", 248, 248, 113, 17)
$Radio13 = GUICtrlCreateRadio("Oyun 2", 248, 280, 113, 17)
$Radio14 = GUICtrlCreateRadio("Oyun 3", 248, 312, 113, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
If GUICtrlRead($Radio1) = 1 Then
MsgBox(64,"Web Tarayıcı","$Radio1 seçili")

ElseIf GUICtrlRead($Radio2) = 1 Then
MsgBox(64,"Web Tarayıcı","$Radio2 seçili")

ElseIf GUICtrlRead($Radio3) = 1 Then
MsgBox(64,"Web Tarayıcı","$Radio3 seçili")

ElseIf GUICtrlRead($Radio4) = 1 Then
MsgBox(64,"Web Tarayıcı","$Radio4 seçili")

EndIf


EndSwitch
WEnd[/codebox]

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