Thread Tools Display Modes
Prev Previous Post   Next Post Next
05/05/14, 02:38 AM   #2
BadVolt
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 74
Originally Posted by DerVagabund View Post
Hello,

I've a few questions which I could not solve myself.
  1. 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?
  2. Can I show/hide a user control on click?
  3. For both above cases, do I have to udpate the parent container where the user controls reside that this is taken into account?
  4. 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.

Last edited by BadVolt : 05/05/14 at 02:52 AM.
  Reply With Quote
 

ESOUI » Developer Discussions » Lua/XML Help » Controls and lua


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