Wolvereness Posted January 17, 2005 Share Posted January 17, 2005 I have a script that creates a large number of boxes:For $CountA = 1 To 20 For $CountB = 1 To 60 $Buttons[$CountA][$CountB] = GUICtrlCreateButton('', ($CountA - 1) * 30, ($CountB - 1) * 10, 30, 10, 0x8c00) Next NextI need a snippet of code to un-select the given box.This is what I currently have:Do For $CountA = 1 To 20 For $CountB = 1 To 60 If $msg = $Buttons[$CountA][$CountB] Then ExitLoop (3) Next Next MsgBox(0, 'Error', 'Could not decipher $msg') Exit Until 1 If GUICtrlRead($Buttons[$CountA][$CountB]) = '' Then GUICtrlSetData($Buttons[$CountA][$CountB], '111111111111111') ElseIf GUICtrlRead($Buttons[$CountA][$CountB]) = '111111111111111' Then GUICtrlSetData($Buttons[$CountA][$CountB], '222222222222222') ElseIf GUICtrlRead($Buttons[$CountA][$CountB]) = '222222222222222' Then GUICtrlSetData($Buttons[$CountA][$CountB], '333333333333333') ElseIf GUICtrlRead($Buttons[$CountA][$CountB]) = '333333333333333' Then GUICtrlSetData($Buttons[$CountA][$CountB], '444444444444444') ElseIf GUICtrlRead($Buttons[$CountA][$CountB]) = '444444444444444' Then GUICtrlSetData($Buttons[$CountA][$CountB], '555555555555555') ElseIf GUICtrlRead($Buttons[$CountA][$CountB]) = '555555555555555' Then GUICtrlSetData($Buttons[$CountA][$CountB], '888888888888888') ElseIf GUICtrlRead($Buttons[$CountA][$CountB]) = '888888888888888' Then GUICtrlSetData($Buttons[$CountA][$CountB], '') Else MsgBox(0, 'Error', 'Could not decipher the box') EndIf Offering any help to anyone (to my capabilities of course)Want to say thanks? Click here! [quote name='Albert Einstein']Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.[/quote][quote name='Wolvereness' date='7:35PM Central, Jan 11, 2005']I'm NEVER wrong, I call it something else[/quote] Link to comment Share on other sites More sharing options...
Josbe Posted January 17, 2005 Share Posted January 17, 2005 You can use Checkbox with $BS_PUSHLIKE style like alternative...Look this little example:#include <GuiConstants.au3> GuiCreate("Sample", 392, 323) GuiCtrlCreateCheckbox("", 90, 40, 80, 50, $BS_PUSHLIKE) GuiCtrlCreateCheckbox("", 90, 100, 80, 60, $BS_PUSHLIKE) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
Wolvereness Posted January 18, 2005 Author Share Posted January 18, 2005 (edited) No I can't... I must have these boxes because of the way they look. /Edit What I am trying to do is remove the box around the button that is created when pressed. Edited January 18, 2005 by Wolvereness Offering any help to anyone (to my capabilities of course)Want to say thanks? Click here! [quote name='Albert Einstein']Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.[/quote][quote name='Wolvereness' date='7:35PM Central, Jan 11, 2005']I'm NEVER wrong, I call it something else[/quote] Link to comment Share on other sites More sharing options...
sykes Posted January 18, 2005 Share Posted January 18, 2005 No I can't... I must have these boxes because of the way they look./Edit What I am trying to do is remove the box around the button that is created when pressed.<{POST_SNAPBACK}>Are you talking about the line that shows up around the control showing the focus is on it? If so, can't you useGUICtrlSetState($controlname, $GUI_Focus)on another Control on the GUI? Like maybe a label? We have enough youth. How about a fountain of SMART? Link to comment Share on other sites More sharing options...
CyberSlug Posted January 18, 2005 Share Posted January 18, 2005 Which button in the attached screenshot (one, two, or three) has the border that you want to get rid of ? Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Wolvereness Posted January 18, 2005 Author Share Posted January 18, 2005 (edited) Screen shot of what I want to get rid of. FYI, the blue! 2 - I think Edited January 18, 2005 by Wolvereness Offering any help to anyone (to my capabilities of course)Want to say thanks? Click here! [quote name='Albert Einstein']Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.[/quote][quote name='Wolvereness' date='7:35PM Central, Jan 11, 2005']I'm NEVER wrong, I call it something else[/quote] Link to comment Share on other sites More sharing options...
CyberSlug Posted January 18, 2005 Share Posted January 18, 2005 #include <GuiConstants.au3> GuiCtrlSetState($refOfSomeOtherControl, $GUI_DEFBUTTON) Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Wolvereness Posted January 18, 2005 Author Share Posted January 18, 2005 #include <GuiConstants.au3>GuiCtrlSetState($refOfSomeOtherControl, $GUI_DEFBUTTON)<{POST_SNAPBACK}>$DefButton or $Focus don't work... It wont remove the box first time box is clicked. When I click a box a second time it works. It's like every other time it works... Offering any help to anyone (to my capabilities of course)Want to say thanks? Click here! [quote name='Albert Einstein']Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.[/quote][quote name='Wolvereness' date='7:35PM Central, Jan 11, 2005']I'm NEVER wrong, I call it something else[/quote] 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