Jump to content

Creating a panel to group items in


dinodod
 Share

Recommended Posts

I am trying to create a panel that I can use to basically group things in and manage via the panel, not each item.

I am trying to create a panel where I can hide all my controls with 1 command rather than have to hide each control individually. I've tried various controls but alas, still to no avail.

Is this possible?

Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007

Link to comment
Share on other sites

The way I read it though is that using just a single GUI not child windows and tabs there is no other way. The post was asking about a way to hide all controls at once and I know there has been several times I needed to do this and tabs and child windows just won't work. They will hide it but sometimes you just can't incorpate them and in that case there is no other way of doing so without hiding them all individually.

Link to comment
Share on other sites

The way I read it though is that using just a single GUI not child windows and tabs there is no other way. The post was asking about a way to hide all controls at once and I know there has been several times I needed to do this and tabs and child windows just won't work. They will hide it but sometimes you just can't incorpate them and in that case there is no other way of doing so without hiding them all individually.

Sure you can with a child window, have done it myself before, actually with one project we had several child windows with controls on each windows and depending on the tab or button pressed would show/hide a window(s).

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

:)

Thank you for your replies. I've heard of child windows and was thinking of them a bit but alas I can not find any such option to make them. From my research in google and the forums, it sounds like I would be making another GUI alltogether? I've seen several posts where they use GUISETSTATE and hide the buttons, etc and wasn't sure if that was part of it.

If there is an example I can be referred to (complete working code of course), I wil assimilate the code and learn from it.

I appreciate the help greatly.

I'll be posting another question here that maybe you've seen as well. Look for my new post.

Thanks!

Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007

Link to comment
Share on other sites

#include <GUIConstants.au3>

_Main()

Func _Main()
    Local $nFileMenu, $nExititem, $GUIMsg, $hGUI, $h_cGUI, $h_cGUI2
    Local $button, $button2

    $hGUI = GUICreate("My GUI", 500, 500, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU))
    GUISetBkColor(0x88AABB)
    $nFileMenu = GUICtrlCreateMenu("File")
    $nExititem = GUICtrlCreateMenuitem("Exit", $nFileMenu)
    
    $h_cGUI = GUICreate("Child GUI 1", 250, 200, 0, 0, $WS_CHILD, $WS_EX_CLIENTEDGE, $hGUI)
    GUISetBkColor(0X006400)
    $listview = GUICtrlCreateListView("col1  |col2|col3  ", 10, 10, 200, 150)
    $button = GUICtrlCreateButton("Hide", 75, 170, 70, 20)
    For $x = 1 To 30
        GUICtrlCreateListViewItem("item" & $x & "|col2|col3", $listview)
    Next
    GUISetState(@SW_SHOW, $h_cGUI)

    GUISwitch($hGUI)
    $button2 = GUICtrlCreateButton("UnHide", 75, 250, 70, 20)
    GUICtrlSetState($button2, $GUI_DISABLE)

    GUISetState(@SW_SHOW, $hGUI)

    While 1
        $GUIMsg = GUIGetMsg()

        Switch $GUIMsg
            Case $GUI_EVENT_CLOSE, $nExititem
                ExitLoop
            Case $button
                GUISetState(@SW_HIDE, $h_cGUI)
                GUICtrlSetState($button2, $GUI_ENABLE)
            Case $button2
                GUISetState(@SW_SHOW, $h_cGUI)
                GUICtrlSetState($button2, $GUI_DISABLE)
        EndSwitch
    WEnd

    Exit
EndFunc   ;==>_Main

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

I'll be darned. That might just be the trick!

Thanks very much!

Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...