Jump to content

Checkbox Border overlay bug?


toxrocks
 Share

Recommended Posts

Hi Guys,

i have two checkboxes directly side by side.

Local $Checkbox1 = GUICtrlCreateCheckbox("", 20, 60, 20, 20)
Local $Checkbox2 = GUICtrlCreateCheckbox("", 32, 60, 20, 20)

Both checkboxes have no text, but if i hover over them, there is an overlapping effect. This looks shitty and flickers as hell... any way to remove this ?

Here are some screenshots:

Default on startup

checkbox_border_1.png.611db0553c285e12503d6e39f296b296.png

When i hover over the left box, this happens:

checkbox_border_2.png.c8b6b5a4167bfcd0d16f8ba4598ef902.png

It seems even there is no text on the checkbox, there is still a placeholder, which overlays with the GUI element next to it.

Anyone got an Idea how to fix this? Increase spacing between both checkboxes is not an option, they have to be together side by side.

Thanks in advance

 

 

Link to comment
Share on other sites

If you have multiple checkboxes back to back, you will need to do something like this :

#include <GUIConstants.au3>

GUICreate ("")
Local $Checkbox1 = GUICtrlCreatePic("UnCheck.bmp", 20, 60, 14, 14)
Local $Checkbox2 = GUICtrlCreatePic("UnCheck.bmp", 34, 60, 14, 14)
Local $bCheck1 = False, $bCheck2 = False, $iMsg
GUISetState ()

While 1
  $iMsg = GUIGetMsg ()
  Switch $iMsg
    Case $GUI_EVENT_CLOSE
      ExitLoop
    Case $Checkbox1
      GUICtrlSetImage ($Checkbox1, $bCheck1 ? "UnCheck.bmp" : "Check.bmp")
      $bCheck1 = Not $bCheck1
    Case $Checkbox2
      GUICtrlSetImage ($Checkbox2, $bCheck2 ? "UnCheck.bmp" : "Check.bmp")
      $bCheck2 = Not $bCheck2
  EndSwitch
WEnd

There is easy ways to optimized this code, it is just an example.  I included the bmp that I used.

 

CheckBox.zip

Link to comment
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
 Share

  • Recently Browsing   0 members

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