navajo Posted October 21, 2006 Share Posted October 21, 2006 Is is possible to pull the the dimensions( or size) of a GuiCtrlCreateGraphic() that has been created? Link to comment Share on other sites More sharing options...
Valuater Posted October 21, 2006 Share Posted October 21, 2006 (edited) never tried this one with a graphic control... but ControlGetPos() in help... Success: Returns an array containing the control's position and size relative to it's window: $array[0] = X position $array[1] = Y position $array[2] = Width $array[3] = Height 8) Edited October 21, 2006 by Valuater Link to comment Share on other sites More sharing options...
navajo Posted October 21, 2006 Author Share Posted October 21, 2006 I guess I should specify, from the within the application that created the GuiCtrlCreateGraphic() object, is it possible to access what commands where given to create the object? Navajo Link to comment Share on other sites More sharing options...
this-is-me Posted October 21, 2006 Share Posted October 21, 2006 You will have to be more specific. What do you mean access the commands? Do you mean set the size of the image? Who else would I be? Link to comment Share on other sites More sharing options...
navajo Posted October 21, 2006 Author Share Posted October 21, 2006 Sorry about the convoluted description here. I've been asked to build up a few udfs for my work lab to help other build small testing scripts. One of the functions I've been asked to do is put together a function call to clear/blank out a window created with a GuiCtrlCreateGraphic() object. All I am supplied with (manager request) is the variable assigned to the GuiCtrlCreateGraphic() upon creation, and the color they would like it cleared to. How my manager would like the function written, func clearcanvas($canvas, $color= 0x000000 ) ; ;------------------------------------------------------------ ; Clear passed GuiCtrlCreateGraphic() object to ; requested color ; $canvas = GuiCtrlCreateGraphic() object ; $color = color to clear canvas to, def is black ;------------------------------------------------------------ Problems I am having is I have no idea what dimensions the GuiCtrlCreateGraphic() object has. My first thought was 'just lay out a 100000x100000 rectangle and color it' LOL You will have to be more specific. What do you mean access the commands? Do you mean set the size of the image? 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