oMBRa Posted November 13, 2008 Posted November 13, 2008 here is my code: #include <GUIConstantsEx.au3> $window = GUICreate('GUI', 200, 100) $button = GUICtrlCreateButton('click', 50, 50) $button2 = GUICtrlCreateButton('button', 250, 50) GUISetState() Global $state = False While 1 $msg = GUIGetMsg() If $msg = $button Then $state = Not $state If $state = True Then WinMove($window, '', Default, Default, 350) ElseIf $state = False Then WinMove($window, '', Default, Default, 200) EndIf EndIf If $msg = $GUI_EVENT_CLOSE Then Exit EndIf WEnd why ''button2'' doesnt appear?
senthor Posted November 13, 2008 Posted November 13, 2008 (edited) because the gui is 200 pix in width and the button starts at 250pix from left. You didn't set a resizing, so the ctrls are moved. #include <GUIConstantsEx.au3> $window = GUICreate('GUI', 200, 100) $button = GUICtrlCreateButton('click', 50, 50) GUICtrlSetResizing(-1, 802) $button2 = GUICtrlCreateButton('button', 250, 50) GUICtrlSetResizing(-1, 802) GUISetState() Global $state = False While 1 $msg = GUIGetMsg() If $msg = $button Then $state = Not $state If $state = True Then WinMove($window, '', Default, Default, 350) ElseIf $state = False Then WinMove($window, '', Default, Default, 200) EndIf EndIf If $msg = $GUI_EVENT_CLOSE Then Exit EndIf WEnd Edited November 13, 2008 by senthor FileListToArray UDFMy tools
oMBRa Posted November 13, 2008 Author Posted November 13, 2008 yes I know it... but how to make the effect that Im trying to do?
dbzfanatic Posted November 13, 2008 Posted November 13, 2008 There was a slide-in/out script I saw a while back, why not look it up? Also I doubt that the button will be drawn at any point unless you draw it after resizing the window. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote]
senthor Posted November 13, 2008 Posted November 13, 2008 You didn't set a resizing, so the ctrls are moved. #include <GUIConstantsEx.au3> $window = GUICreate('GUI', 200, 100) $button = GUICtrlCreateButton('click', 50, 50) GUICtrlSetResizing(-1, 802) $button2 = GUICtrlCreateButton('button', 250, 50) GUICtrlSetResizing(-1, 802) GUISetState() Global $state = False While 1 $msg = GUIGetMsg() If $msg = $button Then $state = Not $state If $state = True Then WinMove($window, '', Default, Default, 350) ElseIf $state = False Then WinMove($window, '', Default, Default, 200) EndIf EndIf If $msg = $GUI_EVENT_CLOSE Then Exit EndIf WEnd FileListToArray UDFMy tools
oMBRa Posted November 13, 2008 Author Posted November 13, 2008 yes GUICtrlSetResizing(-1, 802) is what I missed, thx senthor
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