Jump to content

How can I make a backgroundless Label?


 Share

Recommended Posts

I've been trying to get rid of the background of a label but with no success...

You know, GuiCtrlGreateLabel()....

I tried the transperent thing, $WS_EX_TRANSPARENT, but the label completely disappeared!!

Any help will be appreciated :P

[quote]#include <AutoIt.au3> [indent]$Nothing = Impossible[/quote] [/indent]

Link to comment
Share on other sites

I've been trying to get rid of the background of a label but with no success...

You know, GuiCtrlGreateLabel()....

I tried the transperent thing, $WS_EX_TRANSPARENT, but the label completely disappeared!!

Any help will be appreciated :P

GUICtrlSetBkColor the label to the same color as the GUI.

I'm confused :P ...

by default labels take on the background colour of the main Gui.

So they should always appear "backgroundless".

@Derak, post the code you're having trouble with

Link to comment
Share on other sites

GUICtrlSetBkColor(controlID,$GUI_BKCOLOR_TRANSPARENT)

- Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar!
Link to comment
Share on other sites

GUICtrlSetBkColor(controlID,$GUI_BKCOLOR_TRANSPARENT)

I've just came in...

@ Tomb616

The default bk color of the label is the same default color of the Gui

@ ResNullius

This the code I'm having troubles with :

GUICtrlCreateLabel( "Hello" , 76, 416, 42, 17, $SS_CENTER)
GUICtrlSetBkColor( -1, 0xFFFFFF )
GUICtrlSetState( -1, $WS_EX_TRANSPARENT)

@ andybiochem

Thats it!! :P

GUICtrlSetBkColor(controlID,$GUI_BKCOLOR_TRANSPARENT)

Thanks a lot, andybiochem!! :o

Thanks for all who have tried to help, too :P

[quote]#include <AutoIt.au3> [indent]$Nothing = Impossible[/quote] [/indent]

Link to comment
Share on other sites

@ ResNullius

This the code I'm having troubles with :

GUICtrlCreateLabel( "Hello" , 76, 416, 42, 17, $SS_CENTER)
GUICtrlSetBkColor( -1, 0xFFFFFF )
GUICtrlSetState( -1, $WS_EX_TRANSPARENT)

@ andybiochem

Thats it!! :P

GUICtrlSetBkColor(controlID,$GUI_BKCOLOR_TRANSPARENT)

Thanks a lot, andybiochem!! :o

Thanks for all who have tried to help, too :P

You wouldn't need the GUICtrlSetBkColor(controlID,$GUI_BKCOLOR_TRANSPARENT) if you hadn't used the GUICtrlSetBkColor( -1, 0xFFFFFF ) !

First you've set the label's background colour with GUICtrlSetBkColor( -1, 0xFFFFFF ), then you immediately make it transparent!

What's the point of setting a colour in the first place?

And if you hadn't, your label would have been "backgroundless" as I said in my first post.

The only time the GUICtrlSetBkColor(controlID,$GUI_BKCOLOR_TRANSPARENT) would be needed is if your going to change the background colour of your whole Gui after it first appears, or if you have a picture as the background of your Gui.

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...