Thread Tools Display Modes
05/02/14, 02:20 PM   #1
skyraker
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 154
GetDimensions

Lua Code:
  1. local x,y = toolText:GetDimensions()

When I do this, x and y are both 0, but when I /script it in game, it shows the correct values.

What gives?
  Reply With Quote
05/02/14, 02:45 PM   #2
mra4nii
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 42
I think this mean that in game toolText control is initialized already. But not in your code.
  Reply With Quote
05/02/14, 03:02 PM   #3
skyraker
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 154
Originally Posted by mra4nii View Post
I think this mean that in game toolText control is initialized already. But not in your code.
It is initialized. It is being constantly updated.
  Reply With Quote
05/02/14, 03:22 PM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 648
Are you calling :GetDimensions() before your label has text?

Have you given your label explicit dimensions?
  Reply With Quote
05/02/14, 03:28 PM   #5
skyraker
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 154
Originally Posted by Seerah View Post
Are you calling :GetDimensions() before your label has text?
Heh, I forgot I cleared out the text before adding it back in. Though that gives me an idea on moving some info around.

Thanks Seerah!
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » GetDimensions


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off