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 by anonymous, 11 years ago

$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)
WEnd

When I create labels like this it leaves a lot of space between them, I would like to precisely create labels.

comment:2 by TicketCleanup, 11 years ago

Version: 3.3.12.0

Automatic ticket cleanup.

comment:3 by Melba23, 11 years ago

Resolution: Rejected
Status: newclosed

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.