397 - Create("Label") no SetJustifyH
The Label and InteractiveLabel widget has no widget method to center justify text. Sometimes you want to just center the text in the label. Right now that only way to do that, is to edit the actual label object itself. Which I don't want to do, because when it gets released back into the pool it will not be left justified.
This is the forceful way to do it:
local foobar = AceGUI:Create("InteractiveLabel")
foobar.label:SetJustifyH("CENTER")
There should be a method we could call on the widget that allows us to set the JustifyH. That way it can be reset OnAquire or OnRelease. That way all I would have to do is something like this:
foobar:JustifyH("CENTER")
As an alternative right now, (Which again I DO NOT prefer) the Label and Interactive Label doesn't have an OnRelease you can create one. Again I don't want to do this as it's not part of the official Ace3 widget code.
foobar.OnRelease = function(self, width)
self.label:SetJustifyH("LEFT")
end
That way at least I know it gets left justified when it gets send back into the widget pool.
BTW this also applies to SetJustifyV.
| User | When | Change |
|---|---|---|
| Nevcairiel | Aug 27, 2016 at 16:31 UTC | Changed status from New to Accepted |
| Xruptor | Aug 26, 2016 at 21:18 UTC | Create |
- 2 comments
- 2 comments
Facts
- Last updated
- Aug 27, 2016
- Reported
- Aug 26, 2016
- Status
- Accepted - Problem reproduced / Need acknowledged.
- Type
- Defect - A shortcoming, fault, or imperfection
- Priority
- Medium - Normal priority.
- Votes
- 0
- Component
- AceGUI-3.0
- Reply
- #2
Xruptor Aug 28, 2016 at 16:20 UTC - 0 likesAwesome! Thanks for implementing this Nevcairiel. It will be nice to be able to modify the SetJustifyH and SetJustifyV for both the Label and InteractiveLabels! :D
Going to file a separate ticket for the OnRelease event on the Label and InteractiveLabel.
- Reply
- #1
Nevcairiel Aug 27, 2016 at 16:30 UTC - 0 likesAs you guessed yourself, modifying widgets beyond the public interface is a big no-no, as it can affect other addons then your own.
Anyway there is no particular reason this doesn't exist other then noone asked for it before, so I'll add it when I get a chance - after the Legion launch rush passes.