arnabmk Posted March 5, 2012 Share Posted March 5, 2012 Hi, I am new to this forum and I need your expertise. I have this code where I would like to create two radio buttons which will be displayed below the Header ("CA Alert OneCLick"). However for somereason, only one of the header is getting created. Could you please look at this code. Global $Path = @ScriptDir Global $OneClickGUI,$radio1, $radio2, $msg Global $Project_Name = "CA Alert OneClick" $width = @DesktopWidth/2 $height = @DesktopHeight/2 $OneClickGUI = GUICreate("CA Alert OneCLick", $width, $height, -1, -1) GUISetFont (18, 400,0,"Times New Roman Bold") GUICtrlCreateLabel("CA Alert OneCLick",-1,15,$width,30,$SS_CENTER ) GUICtrlSetColor(-1,0xb22222) GUISetFont(10,400,0,"MS Sans Serif",$OneClickGUI) GUISetBkColor(0xFFFFFF,$OneClickGUI) GUICtrlCreateGraphic(15,$height/6,$width-30,3,$SS_CENTER) GUICtrlSetBkColor(-1,0x23238E) GUICtrlCreateLabel("This tool will allow you to enable/disable specific alerts.",20,$height/5,$width-40,20,$SS_CENTER) GUICtrlSetColor(-1,0xb22222) GUICtrlCreateGroup("TSR Host Alerts:",60,$height/3,$width/4,$height/4) $radio1 = GUICtrlCreateRadio("Radio 1",75,$height/3+30,$width/4-20,20) $radio2 = GUICtrlCreateRadio("Radio 2",75,$height/3+30,$width/4-20,20) GUICtrlSetState($radio2, $GUI_CHECKED) GUISetState() ; will display an dialog box with 1 checkbox Thanks, Arnab Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted March 5, 2012 Moderators Share Posted March 5, 2012 amabmk,I assume you mean "only one radio is being created". Actually they are both being created - but in the same place: $radio1 = GUICtrlCreateRadio("Radio 1",75,$height/3+30,$width/4-20,20) $radio2 = GUICtrlCreateRadio("Radio 2",75,$height/3+30,$width/4-20,20)Just change the x or y coordinate of the second radio and you should see both. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now