amitbern Posted November 23, 2014 Share Posted November 23, 2014 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: #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 Link to comment Share on other sites More sharing options...
JohnOne Posted November 23, 2014 Share Posted November 23, 2014 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. Link to comment Share on other sites More sharing options...
amitbern Posted November 24, 2014 Author Share Posted November 24, 2014 Its a good idea to emulate it with my own buttons, but how can I prevent the auto left/right buttons to appear? Link to comment Share on other sites More sharing options...
TheSaint Posted November 24, 2014 Share Posted November 24, 2014 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? 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) Link to comment Share on other sites More sharing options...
amitbern Posted November 24, 2014 Author Share Posted November 24, 2014 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. Link to comment Share on other sites More sharing options...
TheSaint Posted November 24, 2014 Share Posted November 24, 2014 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. 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) Link to comment Share on other sites More sharing options...
amitbern Posted November 24, 2014 Author Share Posted November 24, 2014 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? Link to comment Share on other sites More sharing options...
TheSaint Posted November 24, 2014 Share Posted November 24, 2014 (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 November 24, 2014 by TheSaint 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) Link to comment Share on other sites More sharing options...
TheSaint Posted November 24, 2014 Share Posted November 24, 2014 (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 November 24, 2014 by TheSaint 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) Link to comment Share on other sites More sharing options...
jguinch Posted November 24, 2014 Share Posted November 24, 2014 Also, you could use the $TCS_MULTILINE style, no ? $hTab_0 = GUICtrlCreateTab(10, 10, 380, 180, $TCS_MULTILINE) Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now