jennico Posted April 11, 2007 Posted April 11, 2007 (edited) hi there, scripting a game for my son i want to create the following: a resizable window with a certain amount of picture controls. the picture controls shall keep their size while the window size is being changed. if the controls don't fit the windows, i want scroll bars to take effect. using the forum help i found out how to make a resizable window with scroll bars :BitOr($WS_POPUP, $WS_HSCROLL, $WS_VSCROLL, $WS_MAXIMIZEBOX, $WS_CAPTION, $WS_SYSMENU, $WS_MINIMIZEBOX, $WS_THICKFRAME). but: - the scroll bars don't do anything and - on changing the window size the controls are resized, too. i want to keep them stable. how can i realize this ? thanx for your constant help here ! j. Edited April 12, 2007 by jennico Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96
Gcommer Posted April 11, 2007 Posted April 11, 2007 I've had the same problem with the resizing controls before... but i just used GUICtrlSetPos() to fix that, since i only had 2 controls in that particular case. For the scrollbars, look here.If you're creating a game, you should also check out prospeed, It has MANY image effects and other stuff, but you'd probably be interested in its scrolling background feature.Also, you may want to look at this.
jennico Posted April 11, 2007 Author Posted April 11, 2007 well, i have to follow the links and read a lot. then, for the GUICtrlSetPos(): do i have to put it into the msg loop, because the ctrl position has to be checked all the time ? this seems a little bit inefficient to me and will cause flickering, or not ? j. Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96
Gcommer Posted April 11, 2007 Posted April 11, 2007 Well, to tell the truth, I didn't have my window resizable like yours is...I had 3 menu options that change the size of the GUI, and at the same time, change the size/position of the controls. It was actually for a pong game i tried to make a while ago, but i never finished so there are a lot of blank functions and stuff I never even got the balls/paddles... Because the code is sorta long (not even 200 lines, but still ) I decided to put in in an attachment.pong.au3
jennico Posted April 11, 2007 Author Posted April 11, 2007 isn't there a better way to keep the controls stable ? i don't think it makes sense to reset the size and position of 600 controls in an infinite loop. the effort is too big. j. Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96
Zedna Posted April 11, 2007 Posted April 11, 2007 (edited) isn't there a better way to keep the controls stable ? i don't think it makes sense to reset the size and position of 600 controls in an infinite loop. the effort is too big.j.Look into AutoIt helpfile at GUICtrlSetResizing()It's exactly what you need.EDIT: especially $GUI_DOCKSIZE Edited April 11, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
jennico Posted April 11, 2007 Author Posted April 11, 2007 (edited) yes ! this seems to be right ! thanx j. Edit: GUICtrlSetResizing(-1,$GUI_DOCKALL) does it ! Edited April 11, 2007 by jennico Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96
jennico Posted April 11, 2007 Author Posted April 11, 2007 (edited) hi again, having read and tested the scrollable gui scripts by gafrost and holger i have to admit that i am shocked. none of those scripts work properly. isn't there a better way to add scrollbars to a gui meanwhile ? j. Edited April 11, 2007 by jennico Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96
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