KSum Posted May 5, 2005 Share Posted May 5, 2005 Hello all, When placing controls with GUICoordMode set to 2 (cell) how do I make 2 columns of cells relative to each other without bouncing between coordinate modes? I know that below will create items neatly one next to another, with the first label neatly aligned below the last control: GUICtrlCreateLabel ("Done 1", -1, 0) ; next line GUICtrlCreateLabel ("Done 3", 0, -1) ; next cell same line but I want to then go the the start of the next line, below the first label, and place 2 more labels. What I get instead, is either items below the last item, or below and right of the last item. Is there anything that might go back 2 positions and thus realign with the first cell? GUICtrlCreateLabel ("Done 1", -1, 0) ; next line GUICtrlCreateLabel ("Done 3", 0, -1) ; next cell same line GUICtrlCreateLabel ("Done 2", -1, [back2]) ; next line back 2 cells GUICtrlCreateLabel ("Done 4", 0, -1) ; next cell same line What I am after would look like: Done 1 Done 3 Done 2 Done 4 Any thoughts? For now I create the first column, change coordinate modes and setting a new column with an absolute position. It works, but i thought there might be something cleaner that I am missing. Regards, Karl Sumwalt Link to comment Share on other sites More sharing options...
jpm Posted May 6, 2005 Share Posted May 6, 2005 Hello all,When placing controls with GUICoordMode set to 2 (cell) how do I make 2 columns of cells relative to each other without bouncing between coordinate modes? I know that below will create items neatly one next to another, with the first label neatly aligned below the last control:GUICtrlCreateLabel ("Done 1", -1, 0) ; next lineGUICtrlCreateLabel ("Done 3", 0, -1) ; next cell same linebut I want to then go the the start of the next line, below the first label, and place 2 more labels. What I get instead, is either items below the last item, or below and right of the last item. Is there anything that might go back 2 positions and thus realign with the first cell?GUICtrlCreateLabel ("Done 1", -1, 0) ; next lineGUICtrlCreateLabel ("Done 3", 0, -1) ; next cell same lineGUICtrlCreateLabel ("Done 2", -1, [back2]) ; next line back 2 cellsGUICtrlCreateLabel ("Done 4", 0, -1) ; next cell same lineWhat I am after would look like:Done 1 Done 3Done 2 Done 4Any thoughts? For now I create the first column, change coordinate modes and setting a new column with an absolute position. It works, but i thought there might be something cleaner that I am missing.Regards,Karl Sumwalt<{POST_SNAPBACK}>Woah that's a long time I did this function. I was thinking it was a good way to do what you want. In fact JON (autoIT creator) was not liking this mode.I need to think about againTHanks for your involment in AutoIt Link to comment Share on other sites More sharing options...
jpm Posted May 6, 2005 Share Posted May 6, 2005 I reread what I did and there is a solution which was not so well documented The 0,-1 means same line for the -1 but 0 means offset=0 for the next cell so if you use (-2-1)*$cellwidth you will be back with 2 positions I will update the doc on Opt("GUICoordMode",2). At a time this was describe in the GUI reference but after cleaning it just disapear from the help. Link to comment Share on other sites More sharing options...
KSum Posted May 6, 2005 Author Share Posted May 6, 2005 if you use (-2-1)*$cellwidth you will be back with 2 positions <{POST_SNAPBACK}>This seems to be what I am looking for. I gave it a try, and had an error stating the variable, $cellwidth, is not declareed. I also tried changing it to match other built in GUI variable names:$GUICELLWIDTH$GUI_CELLWIDTH$GUI_CELL_WIDTHall with the same error. Has this been pulled out, or do I have to define it myself? I searched the help for Cell and only came up with 3 entries, none of which mentioned a cell width value.Karl Link to comment Share on other sites More sharing options...
jpm Posted May 6, 2005 Share Posted May 6, 2005 This seems to be what I am looking for. I gave it a try, and had an error stating the variable, $cellwidth, is not declareed. I also tried changing it to match other built in GUI variable names:$GUICELLWIDTH$GUI_CELLWIDTH$GUI_CELL_WIDTHall with the same error. Has this been pulled out, or do I have to define it myself? I searched the help for Cell and only came up with 3 entries, none of which mentioned a cell width value.Karl<{POST_SNAPBACK}>Sorry I should have explain that when you defined the first cell you should use a variable as $cellwidth you have defined before to set the cell width. you could have to do the same with cell height. Afteryou use those variables to navigate between cells. 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