Sign in to follow this  
Followers 0
Read

Scroll

8 posts in this topic

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.

Posted Image

#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

Share this post


Link to post
Share on other sites



Read,

If you use the GUIScrollBars_Ex UDF from my sig, it is pretty simple: :graduated:

#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


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (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: :graduated:

#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 by Read

Share this post


Link to post
Share on other sites

Read,

This is OK

Thank you for your kind words - I am quite overcome..... :graduated:

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. :D


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites

Something is wrong.

I'm in Test1 and if I click Test2 coming out different color and disappears.

This disturb me.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

My English skill is not good. So, sorry about that.

Share this post


Link to post
Share on other sites

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: :graduated:

#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!). :D

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
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
Sign in to follow this  
Followers 0