Chimaera Posted June 29, 2011 Share Posted June 29, 2011 On a project im working on Which i had some help from Melba and UEZ they used GUICtrlCreateTab for the initial tab and GUICtrlCreateTabItem for the subsequent ones Now before these changes i had $TCS_MULTILINE working nicely as i used GUICtrlCreateTab for every tab i had. Is there a way to force $TCS_MULTILINE to work with GUICtrlCreateTabItem ? I tried updating the tab but that didnt seem to work using $hTab3 = GUICtrlCreateTabItem("[4]") GUICtrlSetStyle(-1, $TCS_MULTILINE) Any thoughts? Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 29, 2011 Moderators Share Posted June 29, 2011 Chimaera,The $TCS_MULTILINE style applied to tabs shows all the tab items at once using multiple rows if necessary. A single tab item does not have subordinate tab items and so applying this style makes no sense. I am afraid I have forgotten what your project dealt with and how tabs were involved. Does it have subordinate tabs on tabitems using child GUIs to hold them? If do then all you need to do is add the $TCS_MULTILINE style to each of the subordinate tabs. Perhaps posting some of your basic GUI and tab code would help. 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...
Chimaera Posted June 29, 2011 Author Share Posted June 29, 2011 (edited) First tab i have this $hTab = GUICtrlCreateTab(10, 10, 683, 583, $TCS_MULTILINE, $TCS_RIGHTJUSTIFY) $tab_font = GUICtrlSetFont( $hTab , $fsize, 600, "", $font) $area_font = GUISetFont( $fsize, 600, "", $font) Then every subsequent one up to 8 tabs is this $hTab1 = GUICtrlCreateTabItem("[1]") GUICtrlSetStyle(-1, $TCS_MULTILINE) $area_font = GUISetFont( $fsize, 600, "", $font) But it ignores the Multiline set with the create tab or the setstyle Edited June 29, 2011 by Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 29, 2011 Moderators Share Posted June 29, 2011 Chimaera,I will try and explain again. The $TCS_MULTILINE style applied to tab controls shows all the tabitem controls at once on multiple rows (if necessary). Omitting the style gives you a single line of tabitem controls with a "left/right" control to move them into view. Here is a short example - first you see the "classic" tab and then the "multiline" tab:expandcollapse popup#include <GUIConstantsEx.au3> #include <TabConstants.au3> _Ex_1() _Ex_2() Func _Ex_1() $hGUI = GUICreate("Classic with 'left/right'", 500, 500) $hTab1 = GUICtrlCreateTab(10, 10, 200, 200) For $i = 0 To 10 GUICtrlCreateTabItem($i) Next GUICtrlCreateTabItem("") GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd EndFunc Func _Ex_2() $hGUI = GUICreate("Multiline", 500, 500) $hTab1 = GUICtrlCreateTab(10, 10, 200, 200, BitOr($TCS_RIGHTJUSTIFY, $TCS_MULTILINE)) For $i = 0 To 10 GUICtrlCreateTabItem($i) Next GUICtrlCreateTabItem("") GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd EndFuncApplying the $TCS_MULTILINE style to a tabitem control makes no sense, as it has no subordinate tabitem controls to display. Why did you want to apply the style to the tabitems? Perhaps you are looking to achieve some other effect which requires another style. 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...
Chimaera Posted June 29, 2011 Author Share Posted June 29, 2011 I wasnt applying it to the tabitems i just wanted it to multiline, ive solved it now with the help of your examples. and im feeling a little stupid right now guess what was missing #include <TabConstants.au3> Told you it was stupid.... Gaaaah Chim If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() 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