Modify

Opened 10 years ago

Closed 10 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 10 years ago by anonymous

$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 Changed 10 years ago by TicketCleanup

  • Version 3.3.12.0 deleted

Automatic ticket cleanup.

comment:3 Changed 10 years ago by Melba23

  • Resolution set to Rejected
  • 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.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.