Modify ↓
Opened 11 years ago
Closed 11 years ago
#2969 closed Feature Request (Rejected)
label size
| Reported by: | anonymous | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | Severity: | None | |
| Keywords: | label, size | Cc: |
Description
GUICreate("test")
GUICtrlCreateLabel("test", 10, 10)
GUICtrlSetBkColor(-1, 0xFFFF00)
GUISetState()
While Sleep(50)
WEnd
The above code creates label but with the width and height bigger then the text. I would like that it would create label with the size of the text because I would like to exactly know where the first label ends so I could precisely put another label next to the previous label. My system is Windows 7.
Attachments (0)
Change History (3)
comment:1 Changed 11 years ago by anonymous
comment:3 Changed 11 years ago by Melba23
- Resolution set to Rejected
- Status changed from new to closed
Use my StringSize UDF:
http://www.autoitscript.com/forum/topic/114034-stringsize-m23-new-version-16-aug-11/
M23
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.

$hGUI = GUICreate("test") $cLabel = GUICtrlCreateLabel("test", 10, 10) GUICtrlSetBkColor(-1, 0xFFFF00) $aPos = ControlGetPos($hGUI, "", $cLabel) GUICtrlCreateLabel("test", 10 + $aPos[2], 10, -1, -1, 0x2) ; 0x2 = SS_RIGHT GUICtrlSetBkColor(-1, 0xFFFF00) GUISetState() While Sleep(50) WEndWhen I create labels like this it leaves a lot of space between them, I would like to precisely create labels.