Modify ↓
Opened 16 years ago
Closed 16 years ago
#765 closed Bug (No Bug)
Tip Text for label not shown after using GUICtrlSetStyle() on that label
Reported by: | MrCreatoR <mscreator@…> | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | 3.3.0.0 | Severity: | None |
Keywords: | GUICtrlSetTip GUICtrlSetStyle | Cc: |
Description
Hi,
First please check this thread, where the bug(?) is found.
It seems that when we using GUICtrlSetStyle on Label control (i checked only few more, such as button, checkbox, radio etc.), the tip that was/is set by GUICtrlSetTip() before/after using SetStyle function is not shown (destroyed?).
Reproducing example:
#include <GUIConstants.au3> #include <StaticConstants.au3> GUICreate("Test GUI", 250, 150) $Label = GUICtrlCreateLabel("Test", 70, 45, 53, 15) GUICtrlSetTip($Label, "My TIP") GUICtrlSetStyle($Label, BitOr($GUI_SS_DEFAULT_LABEL, $SS_CENTER)) ;That's it, tip is not shown GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
P.S
There is a workaround for this issue:
#include <GUIConstants.au3> #include <Constants.au3> #include <StaticConstants.au3> #include <WinAPI.au3> GUICreate("Test GUI", 250, 150) $Label = GUICtrlCreateLabel("Test", 70, 45, 53, 15) GUICtrlSetTip($Label, "My TIP") $iStyle = _WinAPI_GetWindowLong(GUICtrlGetHandle($Label), $GWL_STYLE) GUICtrlSetStyle($Label, BitOr($iStyle, $SS_CENTER)) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
So my geuss that it's f problem in GUICtrlSetStyle()...
Any way, the function should not affect on the Tip creation for the control.
Attachments (0)
Change History (1)
comment:1 Changed 16 years ago by Jpm
- Resolution set to No Bug
- Status changed from new to closed
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
Note: See
TracTickets for help on using
tickets.
The behavior is as expected as GUICtrlSetStyle does not force any style just the one send. In tyhe soecific case $SS_NOTIFY is a forced style which is destroyed as it is not part of default style. you need to supply Forced style if wanted