Sign in to follow this  
Followers 0
HansH

Combo color problems

6 posts in this topic

Experiencing some color problems with a Combo control on a tab

when using the example program, I noticed the following:

- first display of combo1 uses same background color as window background (grey)

- first display of combo2 uses white as bkcolor

- after tabbing all fields the combo2 gets a blue/grey bkcolor (0x7F9DB9)

- switching between tabs turns the bkcolor of combo2 back to white.

Looks like a bug in the initial bkcolor of a combo on a tab control

Is it possible to control the bkcolor of both combo controls ?

Tried GUICtrlSetBkColor(-1,0x00ff00) with each combo without success

Using autoit3 v3.1.1.68(beta)

Thx, Hans

#include <GuiConstants.au3>

$gui = GuiCreate("ComboBox Test", 350, 254)
; --- Create INPUT and COMBO controls on window
  $Label1 = GuiCtrlCreateLabel("Inputbox", 20, 20, 50, 20)
  $Input1 = GuiCtrlCreateInput("", 80, 20, 120, 20)
  $Combo1 = GuiCtrlCreateCombo("", 80, 50, 150, 21, $CBS_DROPDOWNLIST)
  GUICtrlSetData(-1,"AutoIt|v3|is|freeware|BASIC-like|scripting|language","AutoIt")

; --- Create TAB with INPUT and COMBO controls
$tab=GUICtrlCreateTab (10, 90, 330, 140)
$tab0=GUICtrlCreateTabitem ("Test") 
   $Label2 = GuiCtrlCreateLabel("Inputbox", 20, 130, 50, 20)
   $Input2 = GuiCtrlCreateInput("", 80, 130, 120, 20)
   $Combo2 = GuiCtrlCreateCombo("", 80, 160, 150, 21, $CBS_DROPDOWNLIST)
   GUICtrlSetData(-1,"AutoIt|v3|is|freeware|BASIC-like|scripting|language","AutoIt")
$tab1=GUICtrlCreateTabitem ("Dummy")
GUICtrlCreateTabitem ("")  ; End tabcontrol, realy needed ?

ControlFocus($gui, "", $Input1) ; focus on first field
GuiSetState()
While 1
    $msg = GuiGetMsg()
    if $msg = $GUI_EVENT_CLOSE Then  ExitLoop
WEnd
Exit

Share this post


Link to post
Share on other sites



Welcome to the forums!

I think that this thread declares this behaviour as a bug. From what's written there, it appears that a fix will be released in the next beta.

Share this post


Link to post
Share on other sites

Welcome to the forums!

I think that this thread declares this behaviour as a bug. From what's written there, it appears that a fix will be released in the next beta.

<{POST_SNAPBACK}>

My fault, I should have checked the v3 bug section.

Looks like the same problem, will wait for the next beta and check it again

thx

Share this post


Link to post
Share on other sites

Experiencing some color problems with a Combo control on a tab

when using the example program, I noticed the following:

- first display of combo1 uses same background color as window background (grey)

- first display of combo2 uses white as bkcolor

- after tabbing all fields the combo2 gets a blue/grey bkcolor (0x7F9DB9)

- switching between tabs turns the bkcolor of combo2 back to white.

Looks like a bug in the initial bkcolor of a combo on a tab control

Is it possible to control the bkcolor of both combo controls ?

Tried GUICtrlSetBkColor(-1,0x00ff00) with each combo without success

Using autoit3 v3.1.1.68(beta)

Thx, Hans

#include <GuiConstants.au3>

$gui = GuiCreate("ComboBox Test", 350, 254)
; --- Create INPUT and COMBO controls on window
  $Label1 = GuiCtrlCreateLabel("Inputbox", 20, 20, 50, 20)
  $Input1 = GuiCtrlCreateInput("", 80, 20, 120, 20)
  $Combo1 = GuiCtrlCreateCombo("", 80, 50, 150, 21, $CBS_DROPDOWNLIST)
  GUICtrlSetData(-1,"AutoIt|v3|is|freeware|BASIC-like|scripting|language","AutoIt")

; --- Create TAB with INPUT and COMBO controls
$tab=GUICtrlCreateTab (10, 90, 330, 140)
$tab0=GUICtrlCreateTabitem ("Test") 
   $Label2 = GuiCtrlCreateLabel("Inputbox", 20, 130, 50, 20)
   $Input2 = GuiCtrlCreateInput("", 80, 130, 120, 20)
   $Combo2 = GuiCtrlCreateCombo("", 80, 160, 150, 21, $CBS_DROPDOWNLIST)
   GUICtrlSetData(-1,"AutoIt|v3|is|freeware|BASIC-like|scripting|language","AutoIt")
$tab1=GUICtrlCreateTabitem ("Dummy")
GUICtrlCreateTabitem ("")  ; End tabcontrol, realy needed ?

ControlFocus($gui, "", $Input1); focus on first field
GuiSetState()
While 1
    $msg = GuiGetMsg()
    if $msg = $GUI_EVENT_CLOSE Then  ExitLoop
WEnd
Exit

<{POST_SNAPBACK}>

It could be a bug but I am wondering whahy you use $CBS_DROPDOWNLIST? The script seems to work the same without. :whistle:

Share this post


Link to post
Share on other sites

It could be a bug but I am wondering whahy you use $CBS_DROPDOWNLIST? The script seems to work the same without. :whistle:

<{POST_SNAPBACK}>

This style not allow change editbox content, and you can open list with click on the field (not only arrow). I usually prefer to use it...

Share this post


Link to post
Share on other sites

This style not allow change editbox content, and you can open list with click on the field (not only arrow). I usually prefer to use it...

<{POST_SNAPBACK}>

Thanks

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