igmeou Posted March 14, 2005 Posted March 14, 2005 Now, the problem I facing now is that I had some child windows opened in the parent window. Is there a way that I can do a tile horizontally / vertically as similar to in windows I attach my code for your reference. Please let me know how I can shorten/tidy up my code if possible.Upto10childTemplate.au3 [font="Arial"]Thanks[/font]If @error = me Then $sorry Else Do $clarifyMe Until $meClear EndIF MsgBox(0,"Special Message!","Special Thanks to " & $allHadReplied,$Forever)
Blue_Drache Posted March 14, 2005 Posted March 14, 2005 (edited) Now, the problem I facing now is that I had some child windows opened in the parent window. Is there a way that I can do a tile horizontally / vertically as similar to in windowsI attach my code for your reference.Please let me know how I can shorten/tidy up my code if possible.<{POST_SNAPBACK}>You could use a formula to calculate how many windows are open and then place it on the screen in a particular area. Code it for a default 800x600 resolution and then only code specical instances for 640x480 or smaller. Example, parent starts at 0,0 and all windows are 200x 50y in size.Tiling:Parent_x = origin_x Parent_y = origin_y Child_1_x = origin_x Child_1_y = origin_y + (1 * parent_size_y) Child_2_x = origin_x Child_2_y = origin_y + (2 * parent_size_y) Child_3_x = origin_x Child_3_y = origin_y + (3 * parent_size_y) ; new column Child_4_x = origin_x + (1 * parent_size_x) Child_4_y = origin_y + (1 * parent_size_y) Child_5_x = origin_x + (1 * parent_size_x) Child_5_y = origin_y + (2 * parent_size_y) Child_6_x = origin_x + (1 * parent_size_x) Child_6_y = origin_y + (3 * parent_size_y)Example of Cascade, parent starts at 0,0 and all windows are 200x 50y:std_inc = 25 Parent_x = origin_x Parent_y = origin_y Child_1_x = origin_x + std_inc Child_1_y = origin_y + std_inc Child_2_x = origin_x + (2 * std_inc) Child_2_y = origin_y + (2 * std_inc) Child_3_x = origin_x + (3 * std_inc) Child_3_y = origin_y + (3 * std_inc) Edited March 14, 2005 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache
igmeou Posted March 15, 2005 Author Posted March 15, 2005 Example, parent starts at 0,0 and all windows are 200x 50y in size.Tiling:Parent_x = origin_x Parent_y = origin_y Child_1_x = origin_x Child_1_y = origin_y + (1 * parent_size_y) Child_2_x = origin_x Child_2_y = origin_y + (2 * parent_size_y) Child_3_x = origin_x Child_3_y = origin_y + (3 * parent_size_y) ; new column Child_4_x = origin_x + (1 * parent_size_x) Child_4_y = origin_y + (1 * parent_size_y) Child_5_x = origin_x + (1 * parent_size_x) Child_5_y = origin_y + (2 * parent_size_y) Child_6_x = origin_x + (1 * parent_size_x) Child_6_y = origin_y + (3 * parent_size_y)I had went through this and came out with some code but it can't even move any of my child window.Func tiling() $origin_x = 0 $origin_y = 0 ;Row arranging in 3 For $count = 0 To 2 Step 1 $windowSize = WinGetClientSize("Window "&$count,"") ;Either this ;WinMove ("Window "&$count,"", $origin_x + ($count * $windowSize[0]), $origin_y + ($count * $windowSize[1])) ;Or this GUICtrlSetPos ($childControlID[$count], $origin_x + ($count * $windowSize[0]), $origin_y + ($count * $windowSize[1])) Next EndFuncThis code is meant for doing the 1st column tiling but nothing happen when I call this funcion. Anyone please enlighten me please. [font="Arial"]Thanks[/font]If @error = me Then $sorry Else Do $clarifyMe Until $meClear EndIF MsgBox(0,"Special Message!","Special Thanks to " & $allHadReplied,$Forever)
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