Sign in to follow this  
Followers 0
Captnplanet

Problems with transparancy of buttons/checkboxes/labels

2 posts in this topic

#1 ·  Posted (edited)

http://img84.imageshack.us/img84/6493/untitledaj1.jpg

This is just ugly. How do I make the labels and the checkboxes transparent?

This is what I got so far:

#include <GUIConstants.au3>

GUICreate ($GUINAME,400,230)
$pic = GUICtrlCreatePic("C:\pic.jpg",0,0, 400,230)
Guictrlsetstate( $pic , $GUI_DISABLE )
GUISetFont(14,600)
GUICtrlCreateLabel($GUINAME,10,20)
GUISetFont(9,400)
$Var1_CHKBOX = GUICtrlCreateCheckbox("Printer 1",10,70)  ;Checkbox 1
$Var2_CHKBOX = GUICtrlCreateCheckbox("Printer 2",10,90)  ;Checkbox 2
$Var3_CHKBOX = GUICtrlCreateCheckbox("Printer 3",10,110)  
$Var4_Radio = GUICtrlCreateRadio("Zet als Default?  ",250,70) ;radio1
$Var5_Radio = GUICtrlCreateRadio("Zet als Default?  ",250,90) ;radio2
$Var6_Radio = GUICtrlCreateRadio("Zet als Default?  ",250,110) 
$Var7_Radio = GUICtrlCreateRadio("Oude Default behouden.  ", 250, 130)
$RUN = GUICtrlCreateButton("Printer Toevoegen",10,170,120,20)  ;This is the Run button
$EXIT = GUICtrlCreateButton("Afsluiten",168,170,120,20)  ;This is to exit the application
GUISetState()

Call ("Keep_Alive") ;This is the main function that keeps the program open even after you have ran one or more of the items.
                    ;Example, if you have 30 items you can run more items without having to restart the appliction.

Func Keep_Alive()
Do
   $msg = GUIGetMsg()
;This checks the state of the Checkbox if it is checked or 1 then it will set the variable to that.
$VarStatus1 = GUICtrlRead($Var1_CHKBOX)
$VarStatus2 = GUICtrlRead($Var2_CHKBOX)
$Varstatus3 = GUICtrlRead($Var3_CHKBOX)
$Varstatus4 = GUICtrlRead($Var4_Radio)
$Varstatus5 = GUICtrlRead($Var5_Radio)
$Varstatus6 = GUICtrlRead($Var6_Radio)
$Varstatus7 = Guictrlread($Var7_Radio)
Until $msg = $Run or $msg = $EXIT Or $msg = $GUI_EVENT_CLOSE


If $msg = $EXIT Then Exit
If $msg = $GUI_EVENT_CLOSE Then Exit
;If the status is 1 for the variable checkboxes when run is hit, it will execute those lines below which call the functions
SoundPlay("C:\ATEAM.mid")
If $VarStatus1 = 1 Then Call("ITEM_1")
If $VarStatus2 = 1 Then Call("ITEM_2")
If $VarStatus3 = 1 Then Call("ITEM_3")
If $VarStatus4 = 1 Then Call("ITEM_4")
If $VarStatus5 = 1 Then Call("ITEM_5")
If $VarStatus6 = 1 Then Call("ITEM_6")
If $VarStatus7 = 1 Then MsgBox(4096, "Printerbeheer", "Uw Standaardprinter is niet gewijzigd", 10)


Call ("Keep_Alive")
EndFunc


;This is where you would list your functions

Func ITEM_1()
_PrinterAdd("\\someprinterhere\printer")
EndFunc

Func ITEM_2()
_PrinterAdd("\\someprinterhere\printer)
EndFunc

Func ITEM_3()
_PrinterAdd("\\someprinterhere\printer")
EndFunc

Func ITEM_4()
_PrinterDefault("\\someprinterhere\printer")
EndFunc

Func ITEM_5()
_PrinterDefault("\\someprinterhere\printer")
EndFunc

Func ITEM_6()
_PrinterDefault("\\someprinterhere\printer")
EndFunc

I already tried searching a bit but that didnt help much. Thanks in advance.

Edited by Captnplanet

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

For Label you can set the back colour as transparent eg:

$Label = GUICtrlCreateLabel('Printer Control', 10, 20)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)oÝ÷ ØZ+rº1z̨¹Ê.ÛkÊë"¥i·¥z®¶­sbb33cµf#ô4´$õÒuT7G&Ä7&VFT6V6¶&÷gV÷C²gV÷C²ÃÃsÃ2Ã2´6V6¶&÷¤uT7G&Ä7&VFTÆ&VÂb33µ&çFW"b33²Ã#bÃs¤uT7G&Å6WD&´6öÆ÷"ÓÂb33c´uTô$´4ôÄõ%õE$å5$TåB¤uT7G&Å6WD6öÆ÷"ÓÃfffffb¤uT7G&Å6WDföçBÓÃÃCS  ¢b33cµf#%ô4´$õÒuT7G&Ä7&VFT6V6¶&÷gV÷C²gV÷C²ÃÃÃ2Ã2´6V6¶&÷ ¤uT7G&Ä7&VFTÆ&VÂb33µ&çFW""b33²Ã#bäuT7G&Å6WD&´6öÆ÷"ÓÂb33c´uTô$´4ôÄõ%õE$å5$TåB¤uT7G&Å6WD6öÆ÷"ÓÃfffffb¤uT7G&Å6WDföçBÓÃÃCS ¢b33cµf#5ô4´$õÒuT7G&Ä7&VFT6V6¶&÷gV÷C²gV÷C²ÃÃÃ2Ã2¤uT7G&Ä7&VFTÆ&VÂb33µ&çFW"2b33²Ã#bäuT7G&Å6WD&´6öÆ÷"ÓÂb33c´uTô$´4ôÄõ%õE$å5$TåB¤uT7G&Å6WD6öÆ÷"ÓÃfffffb¤uT7G&Å6WDföçBÓÃÃCS

As for radio controls and buttons I haven't looked into it..

But I'm sure with some imagination you can come up with a work around.

Good luck

Edited by smashly

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