Sign in to follow this  
Followers 0
rdwray

Text issing in label

2 posts in this topic

Why is the text missing when I apply the $SS_ETCHEDFRAME style and not before. Thanks

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

Opt('MustDeclareVars', 1)
Const $HAND         = 00    ;$UNKNOWN
Const $APPSTARTING  = 01
Const $ARROW        = 02
Const $CROSS        = 03
Const $HELP         = 04
Const $IBEAM        = 05
Const $ICON         = 06    ; Arrow
Const $NO           = 07
Const $SIZE         = 08    ; Arrow
Const $SIZEALL      = 09
Const $SIZENESW     = 10
Const $SIZENS       = 11
Const $SIZENWSE     = 12
Const $SIZEWE       = 13
Const $UPARROW      = 14
Const $WAIT         = 15
Const $CUSTOM       = 16

Example()

Func Example()

Local $cursor[17] = [$HAND, $APPSTARTING, $ARROW, $CROSS, $HELP, $IBEAM, $ICON, $NO, $SIZE, $SIZEALL, $SIZENESW, $SIZENS, $SIZENWSE, $SIZEWE, $UPARROW, $WAIT, $CUSTOM]
Local $tip[17] = ["HAND", "APPSTARTING", "ARROW", "CROSS", "HELP", "IBEAM", "ICON", "NO", "SIZE", "SIZEALL", "SIZENESW", "SIZENS", "SIZENWSE", "SIZEWE", "UPARROW", "WAIT", "CUSTOM"]
Local $test[17], $i, $y = 0
Local $label1, $label2, $ID

GUICreate("put cursor over label", 300, ($y + 30) * 17)

For $i = 0 to 16
    $test[$i] = GUICtrlCreateLabel("label" & $i, 125, $y, 100, 20, $SS_ETCHEDFRAME)
    GUICtrlSetCursor($test[$i], $cursor[$i])
    GUICtrlSetTip($test[$i], $tip[$i])
    $y += 30
Next
GUISetState()

    While GUIGetMsg() <> $GUI_EVENT_CLOSE
    WEnd
EndFunc   ;==>Example


“No other God have I but Thee; born in a manger, died on a tree.” Martin Luther

Share this post


Link to post
Share on other sites



rdwray,

I believe Deathbringer is correct. :P

However, there is a simple workaround by creating a disabled background label to show the frame and then putting an active label over the top to hold the text. Try changing the creation loop in your script to read like this:

For $i = 0 to 16
    GUICtrlCreateLabel("", 123, $y - 2, 104, 24, $SS_ETCHEDFRAME)
    GUICtrlSetState(-1, $GUI_DISABLE)
    $test[$i] = GUICtrlCreateLabel("label" & $i, 125, $y, 100, 20);, $SS_ETCHEDFRAME)
    GUICtrlSetCursor($test[$i], $cursor[$i])
    GUICtrlSetTip($test[$i], $tip[$i])
    $y += 30
Next

and you get what you wanted - or at least pretty close to it. :shifty:

I hope that is of some help. :x

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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