Thread Tools Display Modes
03-30-14, 02:31 PM   #1
kspadan
A Defias Bandit
Join Date: Apr 2008
Posts: 2
Kgpanels - Show/Hide panel with a macro

Hi all, need to write a macro to show/hide a kgpanel (toggle mode). Anyone knows how to do this?
Thank you.
  Reply With Quote
03-30-14, 03:50 PM   #2
Clamsoda
A Frostmaul Preserver
Join Date: Nov 2011
Posts: 269
I am not very familiar with KGPanels, but I assume the panels have a global name you can access? Find it with /fstack.

Lua Code:
  1. /run local f=FrameNameHere; f:SetShown(not f:IsShown())
  Reply With Quote
03-30-14, 04:11 PM   #3
kspadan
A Defias Bandit
Join Date: Apr 2008
Posts: 2
This work well:

Lua Code:
  1. /run local f=kgPanel1; f:SetShown(not f:IsShown())

The panel have another name in kgpanels /config, but /fstack say kgPanel1 is the real name. But now I have another problem, if I add another panel, kgPanel1 changes automatic to kgPanel2, moreover, when exit and enter wow again, this internal panel names (kgPanelxxx) changes arbitrary. I need a solution to access to my panels by the name I assign to it in kgpanels /config. If anyone knows how to do this please help me.
Thanks.
  Reply With Quote
03-30-14, 05:11 PM   #4
Clamsoda
A Frostmaul Preserver
Join Date: Nov 2011
Posts: 269
Hrm, well if you don't have ANY control over the global name of the panel you create, then the method I proposed won't be reliable.

Hopefully someone with some more insight can shed some light on the thread. Sorry =[.
  Reply With Quote
03-30-14, 07:21 PM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
I believe the script to grab a kgPanel is kgPanels:Fetch("panelname"). But you can read the in-game help to know for sure.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Kgpanels - Show/Hide panel with a macro


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