Channel sorting

The order how channels should be display in the GUI is defined by the channel variable CHANNEL_ORDER, which can be queried with ts3client_getChannelVariableAsUInt64 or changed with ts3client_setChannelVariableAsUInt64.

The channel order is the ID of the predecessor channel after which the given channel should be sorted. An order of 0 means the channel is sorted on the top of its hirarchy.

Channel_1  (ID = 1, order = 0)
Channel_2  (ID = 2, order = 1)
      Subchannel_1  (ID = 4, order = 0)
            Subsubchannel_1  (ID = 6, order = 0)
            Subsubchannel_2  (ID = 7, order = 6)
      Subchannel_2  (ID = 5, order = 4)
Channel_3  (ID = 3, order = 2)

When a new channel is created, the client is responsible to set a proper channel order. With the default value of 0 the channel will be sorted on the top of its hirarchy right after its parent channel.

When moving a channel to a new parent, the desired channel order can be passed to ts3client_requestChannelMove.

To move the channel to another position within the current hirarchy - the parent channel stays the same -, adjust the CHANNEL_ORDER variable with ts3client_setChannelVariableAsUInt64.

After connecting to a TeamSpeak 3 server, the client will be informed of all channels by the onNewChannelEvent callback. The order how channels are propagated to the client by this event is: