View Single Post
03/30/15, 05:53 PM   #10
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
Local variables inside local functions are only known to this function!
If you want to have the value of some variable inside your addon you need to define it local in your addon, outside functions.
Otherwise you need to define it global inside or outside a function, and it will be known outside your addon as well then.

To change the backdrop size you'll need to react on "when a module is added/removed":
-Your backdrop control got a name so use it with WINDOW_MANAGER:GetControlByName("your backdrop's name", "")
-Store this in a vraible like myBackdrop
-use myBackdrop:SetWidth(myNewWidth)
myNewWidth should be changed by the width of all the modules you have added
  Reply With Quote