WoW:API ChatFrame AddChannel: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
({{framexmlfunc|FrameXML/ChatFrame.lua}} __NOTOC__)
m (Move page script moved page API ChatFrame AddChannel to WoW:API ChatFrame AddChannel without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{framexmlfunc|FrameXML/ChatFrame.lua}} __NOTOC__
{{framexmlfunc|FrameXML/ChatFrame.lua}}


  ChatFrame_AddChannel(chatFrame, 'channelName');
  ChatFrame_AddChannel(chatFrame, 'channelName')


Order a chat frame to display a previously-joined chat channel
Order a chat frame to display a previously-joined chat channel




Line 10: Line 10:
:(chatFrame, 'channelName')
:(chatFrame, 'channelName')


:;chatFrame : Object - the chat frame to display the channel in
:;chatFrame
:;channelName : String - The name of the chatchannel to activate.
:: Object - The chat frame to display the channel in. Some ex
:;channelName
:: String - The name of the chatchannel to activate.


=== Returns ===
=== Returns ===
:retCode
:nil
 
:;retCode : Number - ?


== Example ==
== Example ==


  ChatFrame_AddChannel(DEFAULT_CHAT_FRAME, "test");
  ChatFrame_AddChannel(DEFAULT_CHAT_FRAME, "test");
ChatFrame_AddChannel(SELECTED_CHAT_FRAME, "ErrorInfo");
ChatFrame_AddChannel(ChatFrame1, "AnotherChannel");
====chatFrame====
<code>DEFAULT_CHAT_FRAME</code> - Adds the channel to the default chat window.<br />
<code>SELECTED_CHAT_FRAME</code> - Adds the channel in the chat window with focus ( the front window ).<br />
<code>ChatFrameX</code> - Where X is an int from 1 to 10. Seems to add the channel to any chat window, where X=1 is the left-most window.<br />

Latest revision as of 04:45, 15 August 2023

WoW API < ChatFrame:AddChannel

"I" iconThis function is implemented in Lua here FrameXML/ChatFrame.lua.
ChatFrame_AddChannel(chatFrame, 'channelName')

Order a chat frame to display a previously-joined chat channel. 


Parameters

Arguments

(chatFrame, 'channelName')
chatFrame
Object - The chat frame to display the channel in. Some ex
channelName
String - The name of the chatchannel to activate.

Returns

nil

Example

ChatFrame_AddChannel(DEFAULT_CHAT_FRAME, "test");
ChatFrame_AddChannel(SELECTED_CHAT_FRAME, "ErrorInfo");
ChatFrame_AddChannel(ChatFrame1, "AnotherChannel");

chatFrame

DEFAULT_CHAT_FRAME - Adds the channel to the default chat window.
SELECTED_CHAT_FRAME - Adds the channel in the chat window with focus ( the front window ).
ChatFrameX - Where X is an int from 1 to 10. Seems to add the channel to any chat window, where X=1 is the left-most window.