Sign in to follow this  
Followers 0
siva1612

Transparent Combobox & Date Controls

1 post in this topic

#1 ·  Posted

I have created a GUI as shown below. As you can see the label control & text control are made to look exactly the same using the $WS_EX_TRANSPARENT style for the input control.

Is there any way to make the Combo Control and Date control to resemble the style of the label?

#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <GuiComboBoxEx.au3>
#include <DateTimeConstants.au3>

Opt("GUIOnEventMode", 1)

Global $MainScrenWidth = 600, $MainScreenHeight = 520, $LeftFrameWidth = 300, $FrameHeight = 400, $FrameTop = 50, $BottomBarColor = 0xC5C5C5

$MainScreen = GUICreate("Expense Tracker", $MainScrenWidth, $MainScreenHeight, -1, -1, -1)
GUISetOnEvent($GUI_EVENT_CLOSE, "ExitAll")

$ChildScr = GUICreate("", $LeftFrameWidth, $FrameHeight, $LeftFrameWidth, $FrameTop, $WS_POPUP, $WS_EX_MDICHILD, $MainScreen)
GUISetFont(14, 500, 0, "Calibri")

GUICtrlCreateLabel("", 0, 40, $LeftFrameWidth, 330)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetState(-1, $GUI_DISABLE)

$LabelCtrl = GUICtrlCreateLabel("Label Control", 50, 110, $LeftFrameWidth - 50, 32, $SS_CENTERIMAGE)
GUICtrlSetBkColor(-1, 0xFFFFFF)

For $Cnt = 0 To 3
    GUICtrlCreateLabel("", 50, 145 + ($Cnt * 45), $LeftFrameWidth - 50, 2)
    GUICtrlSetBkColor(-1, $BottomBarColor)
Next

$InputCtrl = GUICtrlCreateInput("Input Control", 50, 160, $LeftFrameWidth - 50, 30, $SS_CENTERIMAGE, $WS_EX_TRANSPARENT)
GUICtrlSetBkColor(-1, 0xFFFFFF)

$ComboCtrl = GUICtrlCreateCombo("", 50, 201, $LeftFrameWidth - 50, 28, $CBS_DROPDOWNLIST, $WS_EX_TRANSPARENT)
GUICtrlSetData(-1, "|Combo Control")
GUICtrlSetFont(-1, 15, 500, 0, "Calibri")
GUICtrlSetData(-1, "Combo Control")

$DateCtrl = GUICtrlCreateDate("", 50, 246, $LeftFrameWidth - 50, 32, -1, $WS_EX_TRANSPARENT)
GUICtrlSendMsg(-1, $DTM_SETFORMATW, 0, "ddd dd-MMM-yyyy")

GUISetState()
GUISetState(@SW_SHOW, $MainScreen)

While 1
    Sleep(50)
WEnd

Func ExitAll()
    Exit
EndFunc

 

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