Jump to content
Sign in to follow this  
markloman

Remove the background color of checkbox and tab?

Recommended Posts

markloman

I am building a handy tool with a nice interface. I am working with AutoIt 3.0.103.149 and have some trouble with the gui controls. I am new to the GUI part of AutoIt and I have played with several GUI Control Styles but I am still unable to get the desired result. Please look at the picture. How do I get the background color of the controls transparant?

Posted Image

I hope someone can help so I can work on the GUI.

Share this post


Link to post
Share on other sites
SlimShady

I like the interface already :idiot:

I can't help you. I'm sorry for this useless post.

Share this post


Link to post
Share on other sites
jpm

I am building a handy tool with a nice interface. I am working with AutoIt 3.0.103.149 and have some trouble with the gui controls. I am new to the GUI part of AutoIt and I have played with several GUI Control Styles but I am still unable to get the desired result. Please look at the picture. How do I get the background color of the controls transparant?

Posted Image

I hope someone can help so I can work on the GUI.

<{POST_SNAPBACK}>

Can you post a sample that's reproduce your problem so we can help you?

Thanks :idiot:

Share this post


Link to post
Share on other sites
markloman

Global $WS_CLIPSIBLINGS = 0x4000000;
GUICreate ( $ProgName & " " & $Version, 640, 384 )

$btn_Start = GUICtrlCreateButton ( "Start", 148, 90, 80, 42 )
$btn_Stop = GUICtrlCreateButton ( "Stop", 280, 90, 80, 42 )
$btn_Settings = GUICtrlCreateButton ( "Configuratie", 412, 90, 80, 42 )

$cbx_downloadupdates = GUICtrlCreateCheckbox ( "Download Updates", 40, 220 )

GUICtrlCreateTab ( 30, 170, 580, 170 )
$tab0 = GUICtrlCreateTabitem ( "Hello" )

$main_pic = GUICtrlCreatePic ( "gui.jpg", 0, 0, 640, 384, $WS_CLIPSIBLINGS )

GUICtrlSetState ( $btn_Stop, $GUI_DISABLE )
GuiSetState ( @SW_SHOW )

Don't kill me for this code :idiot: I am just playing around with the settings to get the desired result before I start writing some usefull lines.

Share this post


Link to post
Share on other sites
jpm

Global $WS_CLIPSIBLINGS = 0x4000000;
GUICreate ( $ProgName & " " & $Version, 640, 384 )

$btn_Start = GUICtrlCreateButton ( "Start", 148, 90, 80, 42 )
$btn_Stop = GUICtrlCreateButton ( "Stop", 280, 90, 80, 42 )
$btn_Settings = GUICtrlCreateButton ( "Configuratie", 412, 90, 80, 42 )

$cbx_downloadupdates = GUICtrlCreateCheckbox ( "Download Updates", 40, 220 )

GUICtrlCreateTab ( 30, 170, 580, 170 )
$tab0 = GUICtrlCreateTabitem ( "Hello" )

$main_pic = GUICtrlCreatePic ( "gui.jpg", 0, 0, 640, 384, $WS_CLIPSIBLINGS )

GUICtrlSetState ( $btn_Stop, $GUI_DISABLE )
GuiSetState ( @SW_SHOW )

Don't kill me for this code :idiot: I am just playing around with the settings to get the desired result before I start writing some usefull lines.

<{POST_SNAPBACK}>

change
$cbx_downloadupdates = GUICtrlCreateCheckbox ( "Download Updates", 40, 130 )

The checkbox is not part of the tab so that the reason of the color.

if you want to have it on the tab you have to change the time when you define it

as

$progName= "markloman"
$version="1.0"
;Global $WS_CLIPSIBLINGS = 0x4000000;
GUICreate ( $ProgName & " " & $Version, 640, 384 )

$btn_Start = GUICtrlCreateButton ( "Start", 148, 90, 80, 42 )
$btn_Stop = GUICtrlCreateButton ( "Stop", 280, 90, 80, 42 )
$btn_Settings = GUICtrlCreateButton ( "Configuratie", 412, 90, 80, 42 )


GUICtrlCreateTab ( 30, 170, 580, 170 )
$tab0 = GUICtrlCreateTabitem ( "Hello" )
$cbx_downloadupdates = GUICtrlCreateCheckbox ( "Download Updates", 40, 220 )

;$main_pic = GUICtrlCreatePic ( "gui.jpg", 0, 0, 640, 384, $WS_CLIPSIBLINGS )

GUICtrlSetState ( $btn_Stop, $GUI_DISABLE )
GuiSetState ( @SW_SHOW )
Do
   $msg=GuiGetMsg()
Until $msg=$GUI_EVENT_CLOSE

Cheers :D

Share this post


Link to post
Share on other sites
markloman

Thanks, that's obvious :idiot: Fixed it. But what about the tab?

I think it inherits the color of the window. But when I change the background color of the window to (for example) 0xff0000 (red), only the buttons inherit this color. The tab does not.

Edited by markloman

Share this post


Link to post
Share on other sites
jpm

Thanks, that's obvious :idiot: Fixed it. But what about the tab?

I think it inherits the color of the window. But when I change the background color of the window to (for example) 0xff0000 (red), only the buttons inherit this color. The tab does not.

<{POST_SNAPBACK}>

Tab as stated in the doc cannot be painted as stated in the doc

To terminate the tab control just create a last "tabitem" control with a null text "". The "tabitem" control cannot be painted (too much code ...)

Sorry AutoIt try to stay slim and is mainly a wrapper to windows, not a windows reimplementation :D

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.