Jump to content

Recommended Posts

Posted (edited)

All disabled inputboxes have wrong color (dark grey), when I place it onto the tab control. Seems another painting bug?

#include <GUIConstants.au3>

GUICreate("GUI", 530, 432)
GUICtrlCreateTab (5,5, 480, 380)
GUICtrlSetFont(-1, 7, 400, "", "MS Sans Serif")

GUICtrlCreateTabItem("Main")

$input1 = GUICtrlCreateInput("Black text on dark grey background", 85, 135, 300, 20)

GUICtrlCreateInput("Enabled control", 85, 165, 300, 20)

GUICtrlCreateTabItem("")

$input2 = GUICtrlCreateInput("Gray text on light gray background", 85, 395, 300, 20)

GUISetState(@SW_SHOW)

GUICtrlSetState($input1, $GUI_DISABLE)
GUICtrlSetState($input2, $GUI_DISABLE)

While 1
$iResult=GUIGetMsg()
Select
    Case $iResult = -3
        Exit
Endselect
Wend

Edit: changed code and image for more informativity

Edited by Lazycat
Posted

I have considered this normal so far with Au3 GUI. Mine do it also.

But normally color is same as normal color? But text is faint?

Posted (edited)

If edit boxes are enabled and dark, then your tabs are touching the edges of the gui. This makes them go dark.

Edit: your sample come light when enabled, so not so?

Edit2: Issue for JPM to look at?

Edited by MHz
Posted

If edit boxes are enabled and dark, then your tabs are touching the edges of the gui. This makes them go dark.

Look for the sample above. I know this prob with tab extends beyond gui edges, this is not that case (ok, left upper corner is 0,0 but GUICtrlCreateTab (5,5, 480, 380) not change this). And they are normal white color when enabled. So problem only with disabled controls.

Posted

If edit boxes are enabled and dark, then your tabs are touching the edges of the gui. This makes them go dark.

Edit: your sample come light when enabled, so not so?

Edit2: Issue for JPM to look at?

<{POST_SNAPBACK}>

the gray on input diabled control seems to be a windows behavior as far I can understand :idiot:
Posted (edited)

the gray on input diabled control seems to be a windows behavior as far I can understand

Light gray - of course, but not dark... :idiot: Disabled input not on the tab looks fine...

Of course, this bug is not critical, but it's just strange that same control have different behaviour on the tab and beside this...

Edited by Lazycat
Posted

I just tried older versions and found that most recent version where this bug is absent is 3.0.103.127.  In the version 3.0.103.129 bug already exists, but unfortunately, I missed 128 version...

<{POST_SNAPBACK}>

I have a look 128 was a major change if I remember well
Posted

Same problem for me.

I have included some code to show that different controls seem to have different GUI_DISABLE background colour

Global $gui_enable = 64
Global $gui_disable = 128
Global $GUI_EVENT_CLOSE = -3
Global $GUI_CHECKED         = 1
Global $GUI_UNCHECKED       = 4

Global $values = "ComboBox|ComboBox|ComboBox|ComboBox|ComboBox"
   GUICreate("GUI_Disable backgroud colours", 300, 200)
   GUISetBkColor(0xE5ECF9)
   Global $checkbox1  = GUICtrlCreateCheckbox("", 20, 20, 13, 13)
   Global $input1 = GUICtrlCreateInput("", 100, 20, 50, 20) 
   GUICtrlSetData($input1, "InputBox")
   GUICtrlSetState($input1, $gui_disable)
   
   Global $checkbox2 = GUICtrlCreateCheckbox("", 20, 60, 13, 13);
   Global $comb1 = GUICtrlCreateCombo("", 100, 60, 80, 120) 
   GUICtrlSetData($comb1, $values, "Combo")
   GUICtrlSetState($comb1, $gui_disable)
   
   Global $checkbox3 = GUICtrlCreateCheckbox("", 20, 100, 13, 13);
   Global $list1 = GUICtrlCreateList("", 100, 100, 50, 25)
   GUICtrlSetData($list1, "ListBox")
   GUICtrlSetState($list1, $gui_disable)
   
   GUISetState ()                               
   While 1
      $msg = GuiGetMsg()
      If $msg = $GUI_EVENT_CLOSE Then ExitLoop
      If $msg = $checkbox1 Then
         If GUICtrlRead($checkbox1) = $GUI_CHECKED Then
            GUICtrlSetState($input1, $gui_enable)
         EndIf
         If GUICtrlRead($checkbox1) = $GUI_UNCHECKED Then
            GUICtrlSetState($input1, $gui_disable)
         EndIf
      EndIf
      If $msg = $checkbox2 Then
         If GUICtrlRead($checkbox2) = $GUI_CHECKED Then
            GUICtrlSetState($comb1, $gui_enable)
         EndIf
         If GUICtrlRead($checkbox2) = $GUI_UNCHECKED Then
            GUICtrlSetState($comb1, $gui_disable)
         EndIf
      EndIf
      If $msg = $checkbox3 Then
         If GUICtrlRead($checkbox3) = $GUI_CHECKED Then
            GUICtrlSetState($list1, $gui_enable)
         EndIf
         If GUICtrlRead($checkbox3) = $GUI_UNCHECKED Then
            GUICtrlSetState($list1, $gui_disable)
         EndIf
      EndIf
   WEnd

The InputBox and Cobo ontrol seem to have a "see through" diabled background and the ListBox has a "White" diabled background

Also - (Not shown here ) but as stated by others - when placed inside a TABITEM the disabled InputBox is dark grey.

Should they all default to "white" background with light grey text or "light grey" background with dark grey text.

Thanks for your help.

Posted

Since 103.128 the background color was made transparent to have correct handling on tab using XP theme.

I don't no what to do to satisfy every body :idiot:

as a consequence Lazycat and steve8tch are not too happy but XP themer like better.

Posted

I don't use XP themes - so I wasn't aware of changes that were made to accommodate themes.

Are you able to detect whether the user has XP themes anabled? If you can - could you use transparent background for 'themes' and 'white' for others. I don't know what sort of work is involved in doing this :idiot: - but it would certainly help people who are not running XP or not using XP themes to get that more professional finish to the GUI scripts. :D

Thanks for all your efforts in this area.

Posted

Excellent! Thanks a lot! :idiot:

Only one more req :">  - it's possible to apply your fix also to combo boxes? They are still wrongly painted... I also tried remain controls, they are seems ok.

<{POST_SNAPBACK}>

I know the request will come. I already try without any success but who knows perhaps I will or other will find a good idea :D
Posted

Thanks :idiot: I hope that one day this will be solved.

For now I found workaround for the combo prob. Combo appears in dark grey only when I change selection, but this become normal light grey when change state! So at once after changing selection I just change combo's state to enabled and back. This works fine.

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
  • Recently Browsing   0 members

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