Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Miniwindows ➜ Tabbed miniwindows

Tabbed miniwindows

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Kevnuke   USA  (145 posts)  Bio
Date Wed 03 Jul 2019 10:10 PM (UTC)
Message
I'm sure I've seen somewhere that you made a version of the miniwindows where you can have tabs and each tab has its own content. How does this work? Does each tab have its own unique identifier, or is the whole window named and then content is added to each tab? I was planning to use one as a communications hub in Achaea where the messages from each clan/channel is assigned to a tab. Also how many tabs does a tabbed window support?
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Wed 03 Jul 2019 10:42 PM (UTC)
Message
See https://www.gammon.com.au/forum/?id=14161

It's all explained there.

Quote:

How does this work?


The main part of the window draws a different set of content depending on which tab is active. When you change tabs the main area is cleared and then redrawn.

Quote:

Does each tab have its own unique identifier, or is the whole window named and then content is added to each tab?


It's all one window. The way I implemented it in the link above I had one function to draw each different tab.

So it's like:


if tab1_active then
  draw_tab1()
elseif tab2_active then
  draw_tab2()
elseif tab3_active then
  draw_tab3()
elseif tab4_active then
  draw_tab4()
end


Effectively a tabbed window is X number of windows drawn on top of each other, although of course you don't actually draw them at once, you only draw the active one.

Quote:

I was planning to use one as a communications hub in Achaea where the messages from each clan/channel is assigned to a tab.


That sounds sensible. If your case you could probably use the same code to draw all the channels, the only difference would be which channel gets filtered into each tab.

Quote:

Also how many tabs does a tabbed window support?


As many as you can fit. If you have a wide window then you have room for more tabs at the bottom. You could stack them I suppose although my code doesn't do that.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Kevnuke   USA  (145 posts)  Bio
Date Reply #2 on Thu 04 Jul 2019 01:15 AM (UTC)

Amended on Thu 04 Jul 2019 01:41 AM (UTC) by Kevnuke

Message
Thank you for the reply, Nick. I'll play around with it some and see how things go.

Also, while we're on the subject of miniwindows, when the tooltip value gets set for mouse overs in the mapper plugin, they stay that way even when hovering the mouse over something outside the map. For example, when I hover the mouse over a room named "Centre Crossing" on the map and then over a line in output to see line information, Centre Crossing is still the tooltip title.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #3 on Thu 04 Jul 2019 04:12 AM (UTC)
Message
I can't reproduce that on Windows XP.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Kevnuke   USA  (145 posts)  Bio
Date Reply #4 on Sat 20 Jul 2019 09:53 AM (UTC)
Message
Nick Gammon said:

I can't reproduce that on Windows XP.


It's happening on Windows 10.

Before: https://snag.gy/TSF937.jpg
After: https://snag.gy/1zTYmN.jpg
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


15,653 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.