cramaboule Posted February 8, 2013 Posted February 8, 2013 How to make it working porperly ??? the $hScroller GUI in NOT attached to the Tab1. How to do that ? Thanks Cramy expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include "GUIScrollBars_Ex.au3" #include "StringSize.au3" #include <StaticConstants.au3> $sText1 = "Lorem ipsum dolor sit amet, consectetur adipisicing elit,"; sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." $sText = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." $aText_Info = _StringSize($sText, Default, Default, Default, "", 183) $hGUI = GUICreate("Test", 500, 200) $tab = GUICtrlCreateTab(0, 0, 500, 200) $tab0 = GUICtrlCreateTabItem("Tab1") $HwndT0 = GUICtrlGetHandle($tab0) $hScroller = GUICreate("Scroller", 200, 160, 100, 30,$WS_POPUP, $WS_EX_MDICHILD, $hGUI) $hLabel1 = GUICtrlCreateLabel($sText1, 10, 0, 183,40) $hLabel2 = GUICtrlCreateLabel($aText_Info[0], 10, 41, 183, $aText_Info[3],Default, $WS_EX_DLGMODALFRAME) _GUIScrollbars_Generate ($hScroller, 0, $aText_Info[3]+41) GUISwitch($hGUI) $tab1 = GUICtrlCreateTabItem("Tabt2") $hLabel3 = GUICtrlCreateLabel($sText1, 10, 30, 183,40) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW ,$hGUI) GUISetState(@SW_SHOW ,$hScroller) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website
Moderators Melba23 Posted February 8, 2013 Moderators Posted February 8, 2013 cramaboule,AutoIt only looks after controls created with GUICtrlCreate* commands automatically - if you put anything else in a tab you need to the hard work to hide/show it: expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> #include "GUIScrollBars_Ex.au3" #include "StringSize.au3" #include <StaticConstants.au3> $sText1 = "Lorem ipsum dolor sit amet, consectetur adipisicing elit,"; sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." $sText = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." $aText_Info = _StringSize($sText, Default, Default, Default, "", 183) $hGUI = GUICreate("Test", 500, 200) $tab = GUICtrlCreateTab(0, 0, 500, 200) $tab0 = GUICtrlCreateTabItem("Tab1") $HwndT0 = GUICtrlGetHandle($tab0) $tab1 = GUICtrlCreateTabItem("Tab2") $hLabel3 = GUICtrlCreateLabel($sText1, 10, 30, 183, 40) $hScroller = GUICreate("Scroller", 200, 160, 100, 30, $WS_POPUP, $WS_EX_MDICHILD, $hGUI) $hLabel1 = GUICtrlCreateLabel($sText1, 10, 0, 183, 40) $hLabel2 = GUICtrlCreateLabel($aText_Info[0], 10, 41, 183, $aText_Info[3], Default, $WS_EX_DLGMODALFRAME) _GUIScrollbars_Generate($hScroller, 0, $aText_Info[3] + 41) GUISwitch($hGUI) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW, $hGUI) GUISetState(@SW_SHOW, $hScroller) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $tab Switch GUICtrlRead($tab) Case 0 GUISetState(@SW_SHOW, $hScroller) Case 1 GUISetState(@SW_HIDE, $hScroller) EndSwitch EndSwitch WEndThe Tabs tutorial in the Wiki covers this in more detail. 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
cramaboule Posted February 8, 2013 Author Posted February 8, 2013 @Melba23, Thanks a lot I will have a look at it !!! Cramy My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website
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