Jump to content

LABEL with a border


dazza
 Share

Recommended Posts

This:

$label 1 = GUICtrlCreateLabel(chr(68), 190, 60, 50, 50, $SS_BLACKFRAME)

GUICtrlSetFont($label, 40, 400, 0, "Wingdings")

Just shows a black-framed label with nothing in it.

How do I simply put an outline around a label (and have text in the label)

Many thanks

Link to comment
Share on other sites

Link to comment
Share on other sites

This:

$label 1 = GUICtrlCreateLabel(chr(68), 190, 60, 50, 50, $SS_BLACKFRAME)

GUICtrlSetFont($label, 40, 400, 0, "Wingdings")

Just shows a black-framed label with nothing in it.

How do I simply put an outline around a label (and have text in the label)

Many thanks

A working example modified from help file.

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

Local $font, $msg

GUICreate("My GUI") ; will create a dialog box that when displayed is centered

$font = "Wingdings"
$label = GUICtrlCreateLabel("D", 190, 60, 55, 60, BitOR($SS_CENTER, $SS_CENTERIMAGE), BitOR($SS_BLACKFRAME, $SS_CENTERIMAGE));,$WS_EX_WINDOWEDGE );,$SS_BLACKRECT,,$SS_BLACKFRAME) ))
GUICtrlSetFont(-1, 46, 400, 4, $font)

GUICtrlCreateLabel(Chr(67), 10, 60, 60, 60, $WS_BORDER)
GUICtrlSetFont(-1, 46, 400, 2, $font)

GUISetState()

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()

    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
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...