Read Posted November 8, 2010 Share Posted November 8, 2010 How to make this form? I don't want "edit" box.I make same but Scroll is coming outside and much more. That's bad.#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 623, 449, 192, 124) $Tab1 = GUICtrlCreateTab(48, 32, 465, 305) $TabSheet1 = GUICtrlCreateTabItem("Test") $Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 56, 88, 97, 17) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 8, 2010 Moderators Share Posted November 8, 2010 Read,If you use the GUIScrollBars_Ex UDF from my sig, it is pretty simple: expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GUIScrollbars_Ex.au3> ; Create GUI $Form1 = GUICreate("Form1", 600, 450, 200, 120) ; Create tabs $Tab1 = GUICtrlCreateTab(50, 30, 500, 300) $TabSheet1 = GUICtrlCreateTabItem("Test 1") $TabSheet2 = GUICtrlCreateTabItem("Test 2") GUICtrlCreateTabItem("") ; Create child GUI $GUI_Child_1 = GUICreate("", 490, 270, 55, 55, $WS_POPUP,$WS_EX_MDICHILD, $Form1) ; Add controls $Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 56, 88, 97, 17) $Checkbox2 = GUICtrlCreateCheckbox("Checkbox2", 56, 288, 97, 17) ; Create scrollbars _GUIScrollbars_Generate($GUI_Child_1, 0, 300) ; Show GUIs GUISetState(@SW_SHOW, $GUI_Child_1) GUISetState(@SW_SHOW, $Form1) ; Set current tab value $iLastTab = 0 While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Tab1 ; Check which Tab is active $iCurrTab = GUICtrlRead($Tab1) ; If the Tab has changed If $iCurrTab <> $iLastTab Then ; Show/Hide child GUI as required Switch $iCurrTab Case 0 WinSetState($GUI_Child_1, "", @SW_SHOW) Case 1 WinSetState($GUI_Child_1, "", @SW_HIDE) EndSwitch $iLastTab = $iCurrTab EndIf EndSwitch WEndPlease ask if anything is unclear, or if this is not what you want. 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...
Read Posted November 8, 2010 Author Share Posted November 8, 2010 (edited) This is OK. But... How to change background color in Test1? Perfect color is Test2 If this can be exploited , then I try include my program. Thanks Read, If you use the GUIScrollBars_Ex UDF from my sig, it is pretty simple: expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GUIScrollbars_Ex.au3> ; Create GUI $Form1 = GUICreate("Form1", 600, 450, 200, 120) ; Create tabs $Tab1 = GUICtrlCreateTab(50, 30, 500, 300) $TabSheet1 = GUICtrlCreateTabItem("Test 1") $TabSheet2 = GUICtrlCreateTabItem("Test 2") GUICtrlCreateTabItem("") ; Create child GUI $GUI_Child_1 = GUICreate("", 490, 270, 55, 55, $WS_POPUP,$WS_EX_MDICHILD, $Form1) ; Add controls $Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 56, 88, 97, 17) $Checkbox2 = GUICtrlCreateCheckbox("Checkbox2", 56, 288, 97, 17) ; Create scrollbars _GUIScrollbars_Generate($GUI_Child_1, 0, 300) ; Show GUIs GUISetState(@SW_SHOW, $GUI_Child_1) GUISetState(@SW_SHOW, $Form1) ; Set current tab value $iLastTab = 0 While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Tab1 ; Check which Tab is active $iCurrTab = GUICtrlRead($Tab1) ; If the Tab has changed If $iCurrTab <> $iLastTab Then ; Show/Hide child GUI as required Switch $iCurrTab Case 0 WinSetState($GUI_Child_1, "", @SW_SHOW) Case 1 WinSetState($GUI_Child_1, "", @SW_HIDE) EndSwitch $iLastTab = $iCurrTab EndIf EndSwitch WEnd Please ask if anything is unclear, or if this is not what you want. M23 Edited November 8, 2010 by Read Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 8, 2010 Moderators Share Posted November 8, 2010 Read, This is OKThank you for your kind words - I am quite overcome..... I am not sure why the child GUI is a slightly different colour, but it is simple to change it: $GUI_Child_1 = GUICreate("", 490, 270, 55, 55, $WS_POPUP,$WS_EX_MDICHILD, $Form1) GUISetBkColor(0xFFFFFF) M23 P.S. When you reply please use the "Add Reply" button at the top and bottom of the page rather then the "Reply" button in the post itself. That way you do not get the contents of the previous post quoted in your reply and the whole thread becomes easier to read. 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...
Read Posted November 8, 2010 Author Share Posted November 8, 2010 Something is wrong. I'm in Test1 and if I click Test2 coming out different color and disappears. This disturb me. Link to comment Share on other sites More sharing options...
cageman Posted November 8, 2010 Share Posted November 8, 2010 Try formulating your sentences a little bit more human. Its like you are talking to a robot and asking him to help you. A word like thanks can't hurt. Link to comment Share on other sites More sharing options...
Read Posted November 8, 2010 Author Share Posted November 8, 2010 My English skill is not good. So, sorry about that. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 8, 2010 Moderators Share Posted November 8, 2010 Read, That small colour change is because we are switching GUIs as we switch tabs. You are seeing the inactive child GUI background for an instant before the main GUI takes over. You can see it very clearly here where I have coloured the tab background: expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiTab.au3> #include <GUIScrollbars_Ex.au3> ; Create GUI $Form1 = GUICreate("Form1", 600, 450, 200, 120) ; Create tabs $Tab1 = GUICtrlCreateTab(50, 30, 500, 300) $TabSheet1 = GUICtrlCreateTabItem("Test 1") _GUICtrlTab_SetBkColor($Form1, $Tab1, 0xFF0000) $TabSheet2 = GUICtrlCreateTabItem("Test 2") _GUICtrlTab_SetBkColor($Form1, $Tab1, 0xFF0000) GUICtrlCreateTabItem("") ; Create child GUI $GUI_Child_1 = GUICreate("", 490, 270, 55, 55, $WS_POPUP,$WS_EX_MDICHILD, $Form1) GUISetBkColor(0xFFFFFF) ; Add controls $Checkbox1 = GUICtrlCreateCheckbox("Checkbox1", 56, 88, 97, 17) $Checkbox2 = GUICtrlCreateCheckbox("Checkbox2", 56, 288, 97, 17) ; Create scrollbars _GUIScrollbars_Generate($GUI_Child_1, 0, 300) ; Show GUIs GUISetState(@SW_SHOW, $GUI_Child_1) GUISetState(@SW_SHOW, $Form1) ; Set current tab value $iLastTab = 0 While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Tab1 ; Check which Tab is active $iCurrTab = GUICtrlRead($Tab1) ; If the Tab has changed If $iCurrTab <> $iLastTab Then ; Show/Hide child GUI as required Switch $iCurrTab Case 0 WinSetState($GUI_Child_1, "", @SW_SHOW) Case 1 WinSetState($GUI_Child_1, "", @SW_HIDE) EndSwitch $iLastTab = $iCurrTab EndIf EndSwitch WEnd Func _GUICtrlTab_SetBkColor($hWnd, $hSysTab32, $sBkColor) Local $aTabPos = ControlGetPos($hWnd, "", $hSysTab32) Local $aTab_Rect = _GUICtrlTab_GetItemRect($hSysTab32, -1) GUICtrlCreateLabel("", $aTabPos[0] + 2, $aTabPos[1] + $aTab_Rect[3] + 4, $aTabPos[2] - 6, $aTabPos[3] - $aTab_Rect[3] - 7) GUICtrlSetBkColor(-1, $sBkColor) GUICtrlSetState(-1, $GUI_DISABLE) EndFunc ;==>_GUICtrlTab_SetBkColor I am afraid there is nothing we can do about it - no matter how much it disturbs you. And your English is undoubtedly much better than any attempt I could make to write in your mother tongue (unless it is French!). 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...
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