ioctl Posted July 25, 2005 Share Posted July 25, 2005 I want Line 4 - Cell1 to start from the beggining of line. How can i do that with Opt("GUICoordMode",2) enabled.ThanksHere is the code:#include <GUIConstants.au3>GUICreate("My GUI") ; will create a dialog box that when displayed is centeredGUISetHelp("notepad") ; will run notepad if F1 is typedOpt("GUICoordMode",2)GUICtrlCreateLabel ("Line 1 Cell 1", 10, 30, 70) ; first cell 50 widthGUICtrlCreateLabel ("Line 2 Cell 1", -1, 0) ; next lineGUICtrlCreateLabel ("Line 3 Cell 2", 0, 0) ; next line and next cell GUICtrlCreateLabel ("Line 3 Cell 3", 0, -1) ; next cell same line GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0) ; next line Cell1GUISetState () ; will display an empty dialog box; Run the GUI until the dialog is closedWhile 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoopWend Link to comment Share on other sites More sharing options...
jpm Posted July 25, 2005 Share Posted July 25, 2005 Remember that X and Y value can be use in relative mode. The -1 is just a facility. #include <GUIConstants.au3> GUICreate("My GUI") ; will create a dialog box that when displayed is centered GUISetHelp("notepad") ; will run notepad if F1 is typed Opt("GUICoordMode",2) $widthCell=70 GUICtrlCreateLabel ("Line 1 Cell 1", 10, 30, $widthCell); first cell 70 width GUICtrlCreateLabel ("Line 2 Cell 1", -1, 0); next line GUICtrlCreateLabel ("Line 3 Cell 2", 0, 0); next line and next cell GUICtrlCreateLabel ("Line 3 Cell 3", 0, -1); next cell same line GUICtrlCreateLabel ("Line 4 Cell 1", -3*$widthcell, 0); next line Cell1 GUISetState () ; will display an empty dialog box ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Link to comment Share on other sites More sharing options...
ioctl Posted July 25, 2005 Author Share Posted July 25, 2005 Nice job jpm. Thanks ;-) Link to comment Share on other sites More sharing options...
ioctl Posted July 26, 2005 Author Share Posted July 26, 2005 Another question. Why scroll is not working ??Any ideas?#include <GUIConstants.au3>GUICreate("My GUI",550,400,-1,-1,BitOr($WS_VSCROLL,$WS_MINIMIZEBOX,$WS_GROUP,$WS_CAPTION,$WS_POPUP,$WS_SYSMENU))GUISetHelp("notepad") ; will run notepad if F1 is typedOpt("GUICoordMode",2)$widthCell=70GUICtrlCreateLabel ("Line 1 Cell 1", 10, 30, $widthCell); first cell 70 widthGUICtrlCreateLabel ("Line 2 Cell 1", -1, 0); next lineGUICtrlCreateLabel ("Line 3 Cell 2", 0, 0); next line and next cell GUICtrlCreateLabel ("Line 3 Cell 3", 0, -1); next cell same lineGUICtrlCreateLabel ("Line 4 Cell 1", -3*$widthcell, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 4 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 5 Cell 1", -1, 0); next line Cell1GUICtrlCreateLabel ("Line 6 Cell 1", -1, 0); next line Cell1GUISetState () ; will display an empty dialog box; Run the GUI until the dialog is closedWhile 1$msg = GUIGetMsg()If $msg = $GUI_EVENT_CLOSE Then ExitLoopWend Link to comment Share on other sites More sharing options...
seandisanti Posted July 26, 2005 Share Posted July 26, 2005 Another question. Why scroll is not working ??Any ideas?<{POST_SNAPBACK}>not sure what you want to scroll, but assuming it's the gui, you will need to include either $WS_VSCROLL and/or $WS_HSCROLL in your style specifications in your GUICreate statement Link to comment Share on other sites More sharing options...
GaryFrost Posted July 26, 2005 Share Posted July 26, 2005 They did, but don't think the scroll bars on the gui itself are working or supported as of yet. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
ioctl Posted July 26, 2005 Author Share Posted July 26, 2005 Cameronsdad please see my example. I already added $WS_VSCROLL but scroll is not working... Link to comment Share on other sites More sharing options...
seandisanti Posted July 26, 2005 Share Posted July 26, 2005 Cameronsdad please see my example. I already added $WS_VSCROLL but scroll is not working...<{POST_SNAPBACK}>sorry, i didn't see it, the way i have my browser sized (viewing forum from autoit help file) the line was broken at just the right spot for me to miss it. That's actually something i haven't used before so i was doing a little playing to see if i could get it to work... tried onevent mode and messageloop mode, and can't get a response on the scroll bar either way, except that it appears to set the $msg in messageloop mode to -7. you may be able to create your own solution to this... the platform sdk says that The scroll bar sends WM_HSCROLL and WM_VSCROLL messages to the window procedure whenever the user clicks the scroll bar or drags the scroll box. The low-order words of WM_VSCROLL and WM_HSCROLL each contain a request code that indicates the direction and magnitude of the scrolling action.When the WM_HSCROLL and WM_VSCROLL messages are processed, the scroll bar request code is examined and the scrolling increment is calculated. After the increment is applied to the current scrolling position, the window is scrolled to the new position by using the ScrollWindowEx function, and the position of the scroll box is adjusted by using the SetScrollInfo function.After a window is scrolled, part of its client area is made invalid. To ensure that the invalid region is updated, the UpdateWindow function is used to generate a WM_PAINT message. The platform sdk article on this explains how windows are created using the CreateWindowEx function which allows styles ws_vscroll and ws_hscroll (sounds familiar eh?) and has vb code for creating windows with scroll bars, and interpretting messages sent by the scroll bars. It seems to me that one of the awesome people that participate on these forums *cough* NOT ME *cough* could probably very quickly create a UDF to handle those messages. Link to comment Share on other sites More sharing options...
ioctl Posted July 27, 2005 Author Share Posted July 27, 2005 Could you give me an example ? Link to comment Share on other sites More sharing options...
ioctl Posted July 27, 2005 Author Share Posted July 27, 2005 Yes you have right gafrost. Scroll is not supported in GUI yet. Any ideas how these labels in my code put them in a guiControl and make it scroll ? 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