Button to dynamically resize a parent frame?
Hello,
I'm trying to make a handler in the bottom right of a main frame in order to dynamically resize this frame and its contents. With the following script, only the main frame is resized, not its content (all its children, like subframes, buttons, etc). :confused: I guess I forgot something important... Code:
frame:SetClampedToScreen(true) |
If you were changing its scale, it would perform as you wish it to. Children inherit the scale of their parent. But if you're changing the width/height, you're going to have to do that manually on the children inside.
/edit: There is a slight workaround for this, but I'm not certain if it will work for what your frame looks like. If a child has two anchor points set, then it will resize accordingly. |
Sorry, I wasn't very clear: I would like to scale the frame and its content.
It actually works as intended if I manually perform: Code:
frame:SetScale(0.8); |
Quote:
|
It sounds like :StartSizing() adjusts the frame's size, not its scale.
|
You can add your own scaling on mouse wheel?
(that's what I do for some frames; it's just a bit complicated with text as it doesn't scale the same way as non text so you need to recalculate string width to keep for instance a perfect distance between text and border) |
Quote:
|
Quote:
@MooreaTv: yep, that what I finally did, but the effect is a little creepy. Anyhow, thanks for your answers. |
All times are GMT -6. The time now is 09:05 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI