Sign in to follow this  
Followers 0
star2

GuiCheckBox BkColor Issue

5 posts in this topic

#1 ·  Posted (edited)

well, the problem is that the BkColor of the CheckBox can not be redrawn immediately after using the animation

I've attached a snap-shot of the GUI after lunching,

here is an example Script:

#include <GUICONSTANTS.AU3>

$Gui1 = GUICreate ("test", 250,200 )
GUISetBkColor (0x000000)
GUICtrlCreateTab (5,5,240,160)
GUICtrlCreateTabItem ("Test - 1")
GUICtrlCreateCheckbox ("test test test test test" , 10 , 40, 200,25)
GUICtrlCreateCheckbox ("test test test test test" , 10 , 70, 200,25)
GUICtrlCreateLabel ("test test test test test" , 10 , 100, 200,25)
GUICtrlCreateTabItem("")
$apply_1 = GUICtrlCreateButton ("Test",5,170,240,25)
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Gui1, "int", 500, "long", 0x00040004);slide in from right
GUISetState ()

While 1
    $msg = GUIGetMsg ()
    If $msg = $gui_event_close Then ExitLoop
WEnd

any Ideas?

I've noticed that if I call the Dll Animation before creating the Gui Controls everything will work fine except for the GuiBkColor

any way I'm calling the Dll Animation Function more that once in my script so I need to figure a way to redraw the GuiControls or a way for correcting the BkColor of the Controls.

by the way the problem has something to do with the GuiTabControl !!

as it is the pain in the a** with colorings !!

post-22702-1200991356_thumb.jpg

Edited by star2

[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

Share this post


Link to post
Share on other sites



This will do the trick!!!

#include <GUICONSTANTS.AU3>

$Gui1 = GUICreate("test", 250, 200)
GUISetBkColor(0x000000)
GUICtrlCreateTab(5, 5, 240, 160)
GUICtrlCreateTabItem("Test - 1")
_GUICtrlCreateCheckbox ("test test test test test", 10, 40, 200, 25)
_GUICtrlCreateCheckbox ("test test test test test", 10, 70, 200, 25)
GUICtrlCreateLabel("test test test test test", 10, 100, 200, 25)
GUICtrlCreateTabItem("")
$apply_1 = GUICtrlCreateButton("Test", 5, 170, 240, 25)
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Gui1, "int", 500, "long", 0x00040004);slide in from right
GUISetState()

While 1
    $msg = GUIGetMsg()
    If $msg = $gui_event_close Then ExitLoop
WEnd

Func _GUICtrlCreateCheckBox ($rText, $rLeft, $rTop, $rLength, $rHieght, $rBackColor = "", $rTextColor = "")
    Local $PCRadio = GUICtrlCreateCheckbox("", $rLeft, $rTop, 15, 15)
    Local $PCLabel = GUICtrlCreateLabel($rText, $rLeft + 15, $rTop, $rLength - 15, $rHieght)
    If $rTextColor <> "" Then GUICtrlSetColor(-1, $rTextColor)
    If $rBackColor <> "" Then GUICtrlSetBkColor(-1, $rBackColor)
    Return $PCRadio
EndFunc   ;==>_GUICtrlCreateCheckBox

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

may I bother you with a little explaination?

thanks it works fine.


[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

Share this post


Link to post
Share on other sites

may I bother you with a little explaination?

thanks it works fine.

It just makes a small square box for the checkbox and uses a label for the text... kinda simple

Welcome!!

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

thanks again,

so in fact, there is a problem with existing GuiCreateCheckBox !

or the problem as I said befor in the GuiTabControl !


[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

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