Sign in to follow this  
Followers 0
Sunblood

Trying to color in a circle...

3 posts in this topic

$light = GuiCtrlCreateGraphic($left+10,$top+215)
GuiCtrlSetColor($light,0xff0000)
GuiCtrlSetBkColor($light,0xff0000)
GuiCtrlSetGraphic($light,$GUI_GR_ELLIPSE,15,30,10,10)

Neither SetColor nor SetBkColor will work.

Am I doing something wrong?


Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

this seems to work in the release version, looks like a bug in the beta

#include <GuiConstants.au3>

GuiCreate("MyGUI", 392, 323)

$light = GuiCtrlCreateGraphic(50,50)

GuiCtrlSetColor($light,0xff0000)
GuiCtrlSetBkColor($light,0xff0000)

GuiCtrlSetGraphic($light,$GUI_GR_ELLIPSE,50,50,100,100)


GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
    ;;;
    EndSelect
WEnd
Exit
Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Release version does not support CreateGraphic.

the problem come from the fact that you didn't define a size in GuiCtrlCreateGraphic.

Be careful the color on it, apply to the backgound/border.

You need to color the specific drawing with a GUICtrlSetGraphic(-1,$GUI_GR_COLOR,...)

Share this post


Link to post
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
Sign in to follow this  
Followers 0