Sign in to follow this  
Followers 0
RagsRevenge

Tabsheets customisation

7 posts in this topic

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

Share this post


Link to post
Share on other sites



You mean GUICtrlSetData?

Share this post


Link to post
Share on other sites

#3 ·  Posted (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

post-49245-1242654160_thumb.jpg

post-49245-1242654203_thumb.jpg

Edited by RagsRevenge

Share this post


Link to post
Share on other sites

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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

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