Thread Tools Display Modes
12/07/14, 08:48 AM   #1
klaro00
 
klaro00's Avatar
Join Date: Apr 2014
Posts: 31
How to create a chat tab programmatically

Hi,

when I add a chat tab using function AddChatContainerTab() I notice that the new tab is NOT shown until the GUI is reloaded. How can I force its visibility?

Regards,
Klaro
  Reply With Quote
12/07/14, 09:15 AM   #2
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
function SharedChatContainer:AddWindow(name)

This should create the tab and window controls, it also calls AddChatContainerTab.
  Reply With Quote
12/07/14, 09:26 AM   #3
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
AddChatContainerTab(containerId, name, isCombatLog) is just one of the functions you have to call to make new chat window (tab) working. This will only create settings for the window, but it does not update chat system.

CHAT_SYSTEM itself uses CreateNewChatTab method, but it will also show options for the new window, so you might want to use just chatContainer:AddWindow, see examples below:

Lua Code:
  1. local container = CHAT_SYSTEM.primaryContainer
  2.  
  3. --this command creates a new chat window and displays tab options:
  4. CHAT_SYSTEM:CreateNewChatTab(container)
  5.  
  6. --this command creates a new chat window but does not display options:
  7. local name = "New Tab"
  8. container:AddWindow(name)
  Reply With Quote
12/07/14, 10:31 AM   #4
klaro00
 
klaro00's Avatar
Join Date: Apr 2014
Posts: 31
Thank you, that works perfectly!
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » How to create a chat tab programmatically


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