Jump to content

pulling the Size of a GuiCtrlCreateGraphic() object?


navajo
 Share

Recommended Posts

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 by Valuater

NEWHeader1.png

Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...