Jump to content

Tabsheets customisation


Recommended Posts

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

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
Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 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

 

Link to comment
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.
Link to comment
Share on other sites

  • Moderators

martin,

I do not know what impresses me more: Valik's code or your memory!

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 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

 

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...