Sign in to follow this  
Followers 0
amitbern

Multiple tabs - right/left arrows color

10 posts in this topic

Hello,

Is there any way to change the left/right Arrows color when using multiple TABs?

1. If there are TABs to the right, color RIGHT arrow button

2. if there are TABS to the left, color LEFT arrow button

Picture example:

2ro2ji0.jpg

#include <GUIConstantsEx.au3>
 #include <WindowsConstants.au3>

 $hGUI = GUICreate("Test", 500, 300)

 GUISetState()

 ; Create child GUIs to hold tabs
 $hTab_Win0 = GUICreate("", 400, 200, 50, 20, $WS_POPUP, $WS_EX_MDICHILD, $hGUI)
 $hTab_0 = GUICtrlCreateTab(10, 10, 380, 180)
     $hTab_00 = GUICtrlCreateTabitem("TAB1")
     $hTab_01 = GUICtrlCreateTabitem("TAB2")
     $hTab_00 = GUICtrlCreateTabitem("TAB3")
     $hTab_01 = GUICtrlCreateTabitem("TAB4")
     $hTab_00 = GUICtrlCreateTabitem("TAB5")
     $hTab_01 = GUICtrlCreateTabitem("TAB6")
     $hTab_00 = GUICtrlCreateTabitem("TAB7")
     $hTab_01 = GUICtrlCreateTabitem("TAB8")
     $hTab_00 = GUICtrlCreateTabitem("TAB9")
     $hTab_01 = GUICtrlCreateTabitem("TAB10")
     $hTab_00 = GUICtrlCreateTabitem("TAB11")
     $hTab_01 = GUICtrlCreateTabitem("TAB12")


 GUICtrlCreateTabitem ("")
 GUISetState()


 While 1
     Switch GUIGetMsg()
         Case $GUI_EVENT_CLOSE
             Exit
     EndSwitch
 WEnd

Thanks

Share this post


Link to post
Share on other sites



I don't believe there is any simple way to do that, and certainly not natively. An updown control is a single control, it is also created automatically in your case, so you do not readily have it's ID.

I'm sure there will be some fancy subclassing method or messy hack to get a grip on the control, but If I were wanting to do something like this, I'd probably just try to emulate it, with a couple of buttons.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

Its a good idea to emulate it with my own buttons, but how can I prevent the auto left/right buttons to appear?

Share this post


Link to post
Share on other sites

Why not just have a judiciously placed Label, that has a count of TABS, and do away with the color idea altogether, or incorporate the colors for that label? Different color for each group of TABS maybe?


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites

Why not just have a judiciously placed Label, that has a count of TABS, and do away with the color idea altogether, or incorporate the colors for that label? Different color for each group of TABS maybe?

Because I want the user to be able to know there are unseen TABs, 

On the first pictures its quite obvious because the user can partly see TAB9,

But on the second picture, its not obvious that there are TABS left to TAB6.

Share this post


Link to post
Share on other sites

That's why I said, have a label that clearly lists the number of tabs.

To my mind, that would be more obviously meaningful.

Your color method would only indicate more exist, but not how many more.

Or you could have a label say - More TABS Left ... and/or Right

Or use LEFT and RIGHT buttons that are colored accordingly ... or better still, greyed out and disabled when no more TABS in that direction.


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites

That's why I said, have a label that clearly lists the number of tabs.

To my mind, that would be more obviously meaningful.

Your color method would only indicate more exist, but not how many more.

Or you could have a label say - More TABS Left ... and/or Right

Or use LEFT and RIGHT buttons that are colored accordingly ... or better still, greyed out and disabled when no more TABS in that direction.

 

I would go for the LEFT/RIGHT buttons that are colored accordingly. its more intuitive.

Do you know how to configure those buttons to emulate the left/right automatic buttons?

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Been a while since I played with TABS and cannot test right now, but it may be as simple as setting Focus to the control and sending one or more TAB commands, using the Send command.

GUICtrlRead command will give you the currently selected index.

EDIT

See next post.

Edited by TheSaint

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

See the User Defined Functions (UDF) section at the end of the Help file, where there is a section on GuiTab Management in the GUI Reference section. Lots of different commands available.

Edited by TheSaint

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0