RagsRevenge Posted May 18, 2009 Share Posted May 18, 2009 Hi, I'm a fairly new AutoIT user, and am stuck a little bit. I want to use Tabs to replicate functionality on an existing program. What I want to achieve is that when you select a tabsheet, then the text on that tabsheet tab bolds and changes colour. I've figured out how to change the font on the entire tab and for controls within a tabsheet, but not the actual label for the tab sheet. Hopefully, this is clear enough for someone to help me. Cheers, D Link to comment Share on other sites More sharing options...
Authenticity Posted May 18, 2009 Share Posted May 18, 2009 You mean GUICtrlSetData? Link to comment Share on other sites More sharing options...
RagsRevenge Posted May 18, 2009 Author Share Posted May 18, 2009 (edited) You mean GUICtrlSetData? I don't think so, or at least, if it is, then I don't know how to use it to set the font on 1 tabsheet in a tab. I've attached 2 images... Screenshot001 is the behaviour I want to replicate [EDIT] Bottom right as viewed on here. It's very obvious which tab is selected. Screenshot002 is my current AutoIT tab. [EDIT] Bottom left as viewed on here. As you can see, it's not entirely obvious which tabsheet is selected (Drives) This is especially true when the tab loses focus. I'm thinking of overlaying a label over the selected tab, but I don't think it's a very nice solution. [EDIT2] I should add that I'm not really using the tabsheet functionality of the tab. My only aim is to replicate the tabs look. If a simple solution doesn't exist for setting the tabsheet label font individually, then I can use stand alone buttons. Thanks, D Edited May 18, 2009 by RagsRevenge Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 18, 2009 Moderators Share Posted May 18, 2009 RagsRevenge,Probably not what you want to hear, but just to show you are not overlooking something glaringly obvious (or, of course, that we both are). :-)I can change the font for all the TabItem headers by using GUICtrlSetFont on the original Tab control, but I cannot find a way to change anything other than the text of an individual TabItem header (using GUICtrlSetData). It seems the other GUICtrlSet* functions do not work on TabItems. I know the -SetBackColor function does not work on TabItems and this was explained by a Dev as 'too complicated to code' (or words to that effect) - perhaps the other functions are equally difficult to apply to TabItems.But do not give up hope - there are clever people out there! ;-)M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
martin Posted May 18, 2009 Share Posted May 18, 2009 Maybe you could use this idea by Valik. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 18, 2009 Moderators Share Posted May 18, 2009 martin, I do not know what impresses me more: Valik's code or your memory! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
RagsRevenge Posted May 18, 2009 Author Share Posted May 18, 2009 Maybe you could use this idea by Valik.Wow. Thanks Martin and Valik and M23.Have it working as I wish now. I modified the give code slightly to handle multiple Tabs by passing in the name of the colour tab and the tab to work on. I also changed the functionality to bold and blue the text instead of setting the background. It works perfectly.D 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