Originally Posted by DerVagabund
Hello,
I've a few questions which I could not solve myself.
- Is there a way to enable/disable user controls in a frame while it is shown? E.g., I click on a button and a textbox is enabled, I click again and it is disabled?
- Can I show/hide a user control on click?
- For both above cases, do I have to udpate the parent container where the user controls reside that this is taken into account?
- How can I tell a user control to update while it is shown without closing and re-opening the window?
Hm, well, that are my current question
Thanks for any answers.
|
It is possible, but you shouldn't use too much LUA inside XML. It's always better to create special function that will be triggered on event fired.
1. I think it should work.
<OnClicked>
YourRef:SetMouseEnabled(not (YourRef:IsMouseEnabled()))
</OnClicked>
2.
<OnClicked>
YourRef:SetHidden(not (YourRef:IsHidden()))
</OnClicked>
3. This will help preform any method with your container's parent. If you really need it.
<OnClicked>
(self:GetPatent()):*yourmethod*
</OnClicked>
4. Just update your container as usual. You don't have to hide it.