monitorlg Posted March 17, 2009 Posted March 17, 2009 Hi All, I have created a Form using Koda, which contains a Group box. I want to Change the color of Group box to Yellow, that is Group box should be yellow in color I am not able to change the color of Group box, i am only able to change the Caption of the Groupbox to different color. Here is my script: #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 847, 731, 225, 135) GUISetBkColor(0xA0A0A0) $Trial = GUICtrlCreateGroup("Trial", 184, 48, 273, 649) GUICtrlSetBkColor(-1, 0xFFFFFF) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Please help. Thanks in Advance.
Authenticity Posted March 17, 2009 Posted March 17, 2009 #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 847, 731, 225, 135) GUISetBkColor(0xA0A0A0) GUICtrlCreateGraphic(185, 54, 271, 642) GUICtrlSetBkColor(-1, 0x1095577) $Trial = GUICtrlCreateGroup("Trial", 184, 48, 273, 649) For $i = 1 To 8 GUICtrlCreateRadio('Radio' & $i, 204, $i * 50 + 30, 60, 25) GUICtrlSetColor(-1, 0xFF4444) GUICtrlSetBkColor(-1, 0x1095577) Next ;GUICtrlSetBkColor(-1, 0xFFFFFF) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Heh, it looks weird.
Authenticity Posted March 17, 2009 Posted March 17, 2009 No, sorry man. The colors and how it's mixed with the background color of the entire GUI is weird.
monitorlg Posted March 17, 2009 Author Posted March 17, 2009 No, sorry man. The colors and how it's mixed with the background color of the entire GUI is weird.Oh...Actually that was a trial color...thats the reason it look weird...Can u help me with these...Do u have any idea how to do it....
monitorlg Posted March 17, 2009 Author Posted March 17, 2009 Is the code I've post is ok?I am not able to work with that code...I have posted my Code...In the code for the Group "Modules in IPSCA" i need to paint some color...can u tell me...??????#include <IE.au3>#include <EditConstants.au3>#include <GuiButton.au3>#include <ButtonConstants.au3>#include <GUIConstantsEx.au3>#include <ListBoxConstants.au3>#include <StaticConstants.au3>#include <WindowsConstants.au3>#include <TreeViewConstants.au3>#include <Excel_Monitor.au3>#include <GuiListView.au3>#include <ListViewConstants.au3>#include <GuiConstantsEx.au3>#include <GuiTreeView.au3>#include <Constants.au3>#Region ### START Koda GUI section ### Form=d:\autoit\form1gui.kxf;$Form1_1 = GUICreate("Form1", 1007, 632, 187, 116)$dwidth = @DesktopWidth$dheight = @DesktopHeight$Form1_1 = GUICreate("Form1", $dwidth, $dheight, -3, -3)#Region ### START Koda GUI section ### Form=d:\auto it\ipsca\form1_1.kxf;------------------------------------Modules Group-------------------------------$Gmodules = GUICtrlCreateGroup("Modules in IPSCA", 16, 80, 185, 865)GUICtrlSetBkColor($Gmodules, 0xd8bfd8)$TreeView1 = GUICtrlCreateTreeView(28, 144, 160, 500)$TreeView1_0 = GUICtrlCreateTreeViewItem("System", $TreeView1)$TreeView1_1 = GUICtrlCreateTreeViewItem("Version", $TreeView1_0)$TreeView1_2 = GUICtrlCreateTreeViewItem("Date & Time", $TreeView1_0)$TreeView1_3 = GUICtrlCreateTreeViewItem("Maintainenance", $TreeView1_0)$TreeView1_4 = GUICtrlCreateTreeViewItem("Log", $TreeView1_0)$TreeView1_5 = GUICtrlCreateTreeViewItem("Language", $TreeView1_0)$TreeView1_6 = GUICtrlCreateTreeViewItem("Audio", $TreeView1)$TreeView1_7 = GUICtrlCreateTreeViewItem("Basic", $TreeView1_6)$TreeView1_8 = GUICtrlCreateTreeViewItem("Speaker", $TreeView1_6)$TreeView1_9 = GUICtrlCreateTreeViewItem("Video", $TreeView1)$TreeView1_10 = GUICtrlCreateTreeViewItem("Camera", $TreeView1_9)$TreeView1_11 = GUICtrlCreateTreeViewItem("Stream", $TreeView1_9)$TreeView1_12 = GUICtrlCreateTreeViewItem("Pan/Tilt", $TreeView1_9)$TreeView1_13 = GUICtrlCreateTreeViewItem("Network", $TreeView1)$TreeView1_14 = GUICtrlCreateTreeViewItem("Basic", $TreeView1_13)$TreeView1_15 = GUICtrlCreateTreeViewItem("RTPStream", $TreeView1_13)$TreeView1_16 = GUICtrlCreateTreeViewItem("TCP/IP", $TreeView1_13)$TreeView1_17 = GUICtrlCreateTreeViewItem("DDNS", $TreeView1_13)$TreeView1_18 = GUICtrlCreateTreeViewItem("IP Filtering", $TreeView1_13)$TreeView1_19 = GUICtrlCreateTreeViewItem("Encryption", $TreeView1_13)$TreeView1_20 = GUICtrlCreateTreeViewItem("User", $TreeView1)$TreeView1_21 = GUICtrlCreateTreeViewItem("Basic", $TreeView1_20)$TreeView1_22 = GUICtrlCreateTreeViewItem("List", $TreeView1_20)$TreeView1_23 = GUICtrlCreateTreeViewItem("Schedule", $TreeView1)$TreeView1_24 = GUICtrlCreateTreeViewItem("Event List", $TreeView1_23)$TreeView1_25 = GUICtrlCreateTreeViewItem("Event Server List", $TreeView1_23)$TreeView1_26 = GUICtrlCreateTreeViewItem("Recording Schedule", $TreeView1_23)$TreeView1_27 = GUICtrlCreateTreeViewItem("Recording server", $TreeView1_23)$TreeView1_28 = GUICtrlCreateTreeViewItem("Sensor & Relay", $TreeView1_23)GUICtrlSetFont($TreeView1, 8, 800, 0, "MS Sans Serif")_GUICtrlTreeView_SetBkColor($TreeView1, 0xeee8aa)_GUICtrlTreeView_SetTextColor($TreeView1, 0xff0000)_GUICtrlTreeView_SetLineColor($TreeView1, 0x000000)GUICtrlCreateGroup("", -99, -99, 1, 1)GUISetState(@SW_SHOW) Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSEThanks for the help....
Authenticity Posted March 17, 2009 Posted March 17, 2009 Try this: Add it before the GUICtrlCreateGroup call. GUICtrlCreateGraphic(16, 87, 183, 859) GUICtrlSetBkColor(-1, 0xEEE8AA)
monitorlg Posted March 17, 2009 Author Posted March 17, 2009 Try this: Add it before the GUICtrlCreateGroup call. GUICtrlCreateGraphic(16, 87, 183, 859) GUICtrlSetBkColor(-1, 0xEEE8AA) I have added it before GUICtrlCreateGroup...and i have got the desired result...but i a not able to expand my items in the tree, which i have created inside the Groupbox.... Can u resolve this issue....?????
Authenticity Posted March 17, 2009 Posted March 17, 2009 Put it after the last TreeView item creation.
monitorlg Posted March 17, 2009 Author Posted March 17, 2009 Put it after the last TreeView item creation.Thanks for it...It is working now.....Now i have to try adding images to the treeview items....
vmars Posted August 24, 2009 Posted August 24, 2009 Ah, that's what i am looking for. Great help!Thanks..vmMine looks like:$Form1 = GUICreate("Test FileWriteLog_vm.au3", 683, 170, 260, 145)GUISetBkColor(0x0E2765, $Form1)GUICtrlCreateGraphic(11, 38, 664, 66)GUICtrlSetBkColor(-1, 0xFFD8D8); (-1, 0x3A6EA5) (-1, 0xFFD8D8)$Group1 = GUICtrlCreateGroup("", 8, 32, 665, 73);
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now