rdwray Posted December 10, 2010 Share Posted December 10, 2010 Why is the text missing when I apply the $SS_ETCHEDFRAME style and not before. Thanksexpandcollapse popup#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 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 10, 2010 Moderators Share Posted December 10, 2010 rdwray, I believe Deathbringer is correct. 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. I hope that is of some help. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
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