Sign in to follow this  
Followers 0
bobheart

Change the color of the gui ?

11 posts in this topic

Can the background color be changed ? and top bar ?

Share this post


Link to post
Share on other sites



Can the background color be changed ? and top bar ?

Yeah, the background. Look the examples. (or GUICreateEx function)

Share this post


Link to post
Share on other sites

What one to use ?

FileChangeDir(@ScriptDir)

; Note I did this by hand using relative positioning before I knew any better! - CyberSlug
Opt("GuiCoordMode", 0)

; Start GUI creation
GuiCreate("My GUI", 380, 300)
; will run notepad if F1 is typed,set a default background and change icon
GUICreateEx("notepad",0x00E0FFFF,"autosave.ico")

Global $ACS_AUTOPLAY = 4
GUISetControl( "avi", "inetconnect.avi", 1, 1,-1,-1,$ACS_AUTOPLAY)
    GUISetControl("label", "Sample avi", 1, 40, 70)
GUISetControl( "button", "Button", 1, 40)
GUISetControl( "combo", "", 1, 50)
    GUISetControlData(-1, "Combo", "Combo")
GUISetControl( "date", "", 1, 50, 200)
    GUISetControl("label", "Date control expands in to a calendar...", 1, 30)
    GUISetControlEx(-1,0,0,"",0xff); set text in red
GUISetControl( "edit", "This is an edit control", 1, 30, 200, 50)

Opt("GuiCoordMode", 1); switch to absolute coordinate mode
GUISetControl( "label","", 100, 1, 1, 1)
Opt("GuiCoordMode", 0)

GUISetControl( "input", "Input", -10, 80, 100, 20)

GUISetControl("label", "This is a green label", 1, 50, 100, 20)
    GUISetControlEx(-1, 0, 0, "" ,0, 0x00FF00); backgroun in red

Opt("GuiCoordMode", 1)
GUISetControl( "list","", 200, 1, 120, 60)
    GUISetControlData(-1, "Listbox control|Sample", "Sample")
Opt("GuiCoordMode", 0)

GUISetControl( "progress", "", 1, 50, 120, 20)
    GUISetControlEx (-1, 70)
    GUISetControl("label", "Sample progress", 40, 21)

GUISetControl( "group", "Group", -30, 30, 140, 70)
    GUISetControl( "radio", "Radio One", 10, 20, 80, 20)
    GUISetControl( "radio", "Radio Two", -1, 20, 80, 20)
        GuiSetControlEx(-1, 1);check Radio Two

Opt("GuiCoordMode", 1)
GUISetControl("checkbox", "Checkbox", 250, 270, 100,20)

GUISetControl( "icon","shell32.dll|2", 330, 10)
   GUISetControl("label", "  Icon", 330, 50)

GUISetControl( "pic","logo.bmp", 80, 1)
   GUISetControl("label", "Sample pic", 115, 45, 60, 15)

; start creation of a tab control
GUISetControl("tab", "", 220, 180, 140, 80)
GuiSetControlFont(-1,9,700)  ; to display tab names in bold

; define first tab name
    GUISetControl("tabitem", "One", 1, 60)
     GUISetControl("label", "Sample tab control", 230, 220, 100, 30)

; define second tab name
    GUISetControl("tabitem", "Two...", 1, 60)
; define second tab name
    GUISetControl("tabitem", "Three...", 1, 60)
; end tab definition
GUISetControl("tabitem", "",0,0)

; display the GUI waiting a close action by default only button close the GUI
GuiWaitClose()

I can't see where to change color ?

Share this post


Link to post
Share on other sites

in

GUICreateEx("notepad",0x00E0FFFF,"autosave.ico")

...

The "0x00E0FFFF" is a color.


-Brett

Share this post


Link to post
Share on other sites

Why is there nothing on GUIs in the helpfile? I'd like to learn more about them and use them.

Share this post


Link to post
Share on other sites

i just figured that out when i was looking at the example for the first time also because i could tell that it was a color. it might be in the help file somewhere though, sometimes its just hard to find.


-Brett

Share this post


Link to post
Share on other sites

Yep that does the trick , now how would I know what numbers do what colors ?

Share this post


Link to post
Share on other sites

Pink lol 0x00E0CFFF

Share this post


Link to post
Share on other sites

if u get the pixel finder from the scripts and scraps section ... i forgot who made it... u can put ur mouse over a color and find it...or u can just get a program or list of colors from another website and it'll tell u


-Brett

Share this post


Link to post
Share on other sites

Why is there nothing on GUIs in the helpfile? I'd like to learn more about them and use them.

They are in the helpfile in the AutoIt: Function Referance: Message Boxes and Dialogs: Gui Referance section. You'll need to obtain your files from the unstable section to be able to use any GUI functions, and that's where the helpfile is that explains them.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

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