TheDcoder Posted March 6, 2015 Posted March 6, 2015 (edited) How can I the hide tabs without hiding the progress bar & slider inside them... (Click image for animation) I want to make a invisible navigation system by activating tabs when a specific button is clicked Thanks in Advance Edited March 6, 2015 by TheDcoder EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion
Moderators Melba23 Posted March 6, 2015 Moderators Posted March 6, 2015 TheDcoder,The whole idea of tabs is to keep the controls separate. How do you want the progress and slider to be displayed without the tabs? 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
TheDcoder Posted March 6, 2015 Author Posted March 6, 2015 Sorry for not explaining properly, I have edited the question EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion
Moderators Melba23 Posted March 6, 2015 Moderators Posted March 6, 2015 TheDcoder,Then I suggest you use a series of child GUIs and hide/show them as required. 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
TheDcoder Posted March 6, 2015 Author Posted March 6, 2015 Then I suggest you use a series of child GUIs and hide/show them as required. I have a very special ctrl present in my main GUI, so i would like to stick to this idea EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion
Moderators Melba23 Posted March 6, 2015 Moderators Posted March 6, 2015 TheDcoder,A tab control is essentially a windows controlled series of child GUIs with the tabs at the top for user selection, so what I am suggesting is no different really. What is this "very special control" that demands the use of tabs? 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
TheDcoder Posted March 6, 2015 Author Posted March 6, 2015 (edited) What is this "very special control" that demands the use of tabs? Func GUICtrlCreateOutputTerminal($hWnd, $iLeft, $iTop, $iWidth, $iHeight) $return = _GUICtrlRichEdit_Create($hWnd, "", $iLeft, $iTop, $iWidth, $iHeight, $WS_HSCROLL + $WS_VSCROLL + $ES_READONLY + $ES_MULTILINE) Local $RGB[3] $RGB[0] = 0 $RGB[1] = 0 $RGB[2] = 0 $colour = _ColorSetCOLORREF($RGB) _GUICtrlRichEdit_SetBkColor($return, $colour) Return $return EndFunc ;= OutputTerminal Edited March 6, 2015 by TheDcoder EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion
Moderators Melba23 Posted March 6, 2015 Moderators Posted March 6, 2015 TheDcoder,So why does a RichEdit prevent the use of child GUIs? You can place it within a child without problem. M23P.S. And I suggest you read the Setting Styles tutorial in the Wiki to see how to apply multiple styles correctly. 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
TheDcoder Posted March 7, 2015 Author Posted March 7, 2015 So why does a RichEdit prevent the use of child GUIs? You can place it within a child without problem. I just want it to be fixed in its place EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion
Moderators Melba23 Posted March 9, 2015 Moderators Posted March 9, 2015 TheDcoder,You need to explain what you need more clearly - is the RichEdit inside or outside the Tab control? Just draw a little picture of how you want the final GUI to look and we can start producing it. 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
TheSaint Posted March 9, 2015 Posted March 9, 2015 Does the slider and progress need to be on a tab? Can't you just have them placed above or below the tab control? That seems more logical to me. But then like Melba23 said, it is not very clear what you are doing overall, and some simple drawing would help immensely. 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)
TheDcoder Posted March 9, 2015 Author Posted March 9, 2015 You need to explain what you need more clearly - is the RichEdit inside or outside the Tab control? Just draw a little picture of how you want the final GUI to look and we can start producing it. Thanks, I will make a simple drawing using ms paint and post it here TD EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion
benners Posted March 9, 2015 Posted March 9, 2015 I had the same scenario. I got around it by creating an empty label control and positioning it across the tabs headers.
TheDcoder Posted March 9, 2015 Author Posted March 9, 2015 TD EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion
TheDcoder Posted March 9, 2015 Author Posted March 9, 2015 (edited) I had the same scenario. I got around it by creating an empty label control and positioning it across the tabs headers. Will try Result: Edited March 9, 2015 by TheDcoder EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion
Moderators Melba23 Posted March 9, 2015 Moderators Posted March 9, 2015 TheDcoder,Here you go - in a very simplistic form: expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiRichEdit.au3> $hGUI = GUICreate("Test", 500, 500) $cNav = GUICtrlCreateLabel("", 0, 0, 150, 300) GUICtrlSetBkColor($cNav, 0xFE7E27) GUICtrlSetState($cNav, $GUI_DISABLE) $cButton_0 = GUICtrlCreateButton("Child 0", 10, 10, 80, 30) $cButton_1 = GUICtrlCreateButton("Child 1", 10, 50, 80, 30) $cButton_2 = GUICtrlCreateButton("Child 2", 10, 90, 80, 30) $hRichEdit = _GUICtrlRichEdit_Create($hGUI, "RichEdit", 0, 300, 500, 200) _GUICtrlRichEdit_SetBkColor($hRichEdit, 0) GUISetState(@SW_SHOW, $hGUI) $hChild_0 = GUICreate("Child 0", 350, 300, 150, 0, $WS_POPUP, $WS_EX_MDICHILD, $hGUI) GUISetBkColor(0xFF0000) GUISetState(@SW_SHOW, $hChild_0) $hChild_1 = GUICreate("Child 1", 350, 300, 150, 0, $WS_POPUP, $WS_EX_MDICHILD, $hGUI) GUISetBkColor(0x00FF00) GUISetState(@SW_HIDE, $hChild_1) $hChild_2 = GUICreate("Child 2", 350, 300, 150, 0, $WS_POPUP, $WS_EX_MDICHILD, $hGUI) GUISetBkColor(0x0000FF) GUISetState(@SW_HIDE, $hChild_2) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cButton_0 _All_Hide() GUISetState(@SW_SHOW, $hChild_0) Case $cButton_1 _All_Hide() GUISetState(@SW_SHOW, $hChild_1) Case $cButton_2 _All_Hide() GUISetState(@SW_SHOW, $hChild_2) EndSwitch WEnd Func _All_Hide() GUISetState(@SW_HIDE, $hChild_0) GUISetState(@SW_HIDE, $hChild_1) GUISetState(@SW_HIDE, $hChild_2) EndFuncM23 TheDcoder 1 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
TheDcoder Posted March 9, 2015 Author Posted March 9, 2015 Thanks Melba EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion
TheDcoder Posted March 9, 2015 Author Posted March 9, 2015 (edited) Also, This puts me to a dis-advantage, i.e I can't use my GUI designer anymore. Any suggestions?, Thanks ! <Suggestion coming soon!> TD Edited March 9, 2015 by TheDcoder EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion
benners Posted March 9, 2015 Posted March 9, 2015 simple layout example expandcollapse popup#include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <GuiTab.au3> #include <StaticConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) #Region ### START Koda GUI section ### Form= $Form2 = GUICreate("Form2", 526, 300, 831, 260) GUISetOnEvent($GUI_EVENT_CLOSE, "Form2Close") $Label1 = GUICtrlCreateLabel("", 160, 68, 290, 25) $Button1 = GUICtrlCreateButton("Button1", 24, 112, 75, 25) GUICtrlSetOnEvent(-1, "Button1Click") $Button2 = GUICtrlCreateButton("Button2", 24, 152, 75, 25) GUICtrlSetOnEvent(-1, "Button2Click") $Tab1 = GUICtrlCreateTab(160, 72, 289, 193) $TabSheet1 = GUICtrlCreateTabItem("TabSheet1") $Button4 = GUICtrlCreateButton("tab 1", 176, 112, 75, 25) $Combo1 = GUICtrlCreateCombo("Combo1", 176, 152, 145, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) $Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 176, 192, 97, 17) $TabSheet2 = GUICtrlCreateTabItem("TabSheet2") $Button5 = GUICtrlCreateButton("tab 2", 176, 112, 75, 25) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 Sleep(100) WEnd Func Button1Click() _GUICtrlTab_ActivateTab($Tab1, 0) EndFunc ;==>Button1Click Func Button2Click() _GUICtrlTab_ActivateTab($Tab1, 1) EndFunc ;==>Button2Click Func Form2Close() Exit EndFunc ;==>Form2Close
Solution orbs Posted March 9, 2015 Solution Posted March 9, 2015 sorry to budge in so late, have you noticed that the position of the controls inside tabs are not relative to the tab position? well, what happens if you position the tab outside of the GUI, but leave the controls position unchanged? you get "hidden" tab, with perfectly visible controls: expandcollapse popup#include <GUIConstantsEx.au3> Example() Func Example() Local $msg GUICreate('"hidden" tab') GUISetBkColor(0x00E0FFFF) GUISetFont(9, 300) GUICtrlCreateTab(1000, 10, 200, 100) ; >>>>>>>>>> x=1000 = outside of the GUI Local $gTab0 = GUICtrlCreateTabItem("tab0") GUICtrlCreateLabel("label0", 30, 80, 50, 20) GUICtrlCreateButton("OK0", 20, 50, 50, 20) GUICtrlCreateInput("default", 80, 50, 70, 20) Local $gTab1 = GUICtrlCreateTabItem("tab----1") GUICtrlCreateLabel("label1", 30, 80, 50, 20) GUICtrlCreateCombo("", 20, 50, 60, 120) GUICtrlSetData(-1, "Trids|CyberSlug|Larry|Jon|Tylo", "Jon") ; default Jon GUICtrlCreateButton("OK1", 80, 50, 50, 20) Local $gTab2 = GUICtrlCreateTabItem("tab2") GUICtrlSetState(-1, $GUI_SHOW) ; will be display first GUICtrlCreateLabel("label2", 30, 80, 50, 20) GUICtrlCreateButton("OK2", 140, 50, 50) GUICtrlCreateTabItem("") ; end tabitem definition GUICtrlCreateLabel("label3", 20, 130, 50, 20) Local $gShowTab0 = GUICtrlCreateButton('show contents of tab 0', 20, 200, 200, 20) Local $gShowTab1 = GUICtrlCreateButton('show contents of tab 1', 20, 230, 200, 20) Local $gShowTab2 = GUICtrlCreateButton('show contents of tab 2', 20, 260, 200, 20) GUISetState() ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE ExitLoop Case $gShowTab0 GUICtrlSetState($gTab0, $GUI_SHOW) Case $gShowTab1 GUICtrlSetState($gTab1, $GUI_SHOW) Case $gShowTab2 GUICtrlSetState($gTab2, $GUI_SHOW) EndSwitch WEnd EndFunc ;==>Example PRO: you avoid the main window focus loss/regain that is apparent when using child GUI's. CON: transparent controls inside tab have their background color as the tab (i.e. white), not as the GUI. TheDcoder and Ascer 1 1 Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates WinPose - simultaneous fluent move and resize Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Magic Math - a math puzzle Demos: Title Bar Menu - click the window title to pop-up a menu
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