Como adicionar SubListBox ao meu ListBox principal

0

Eu já desenvolvi minha ListBox (captura de tela em anexo).

Listadoscomo:

  1. Inquiry_Callback

  2. OptOut_Unsub

  3. OptOut_Callback

  4. Dispute_Callback

  5. Others_Others

  6. S_Inquiry_Callback

  7. S_OptOut_Unsub

  8. S_OptOut_Callback

  9. S_Dispute_Callback

  10. S_Others_Others

  11. S_Inquiry_Callback_N

  12. S_OptOut_Callback_N

  13. S_Dispute_Callback_N

  14. Email_Opt_out_IVR

  15. S_Email_OptOut_IVR

  16. S_Email_OptOut_IVR_N

Tenho29clientesquepodemcairemqualquerumadascategoriasacima,oquesignifica16x29=464modelos.

Aminhaperguntaé:comopossomodificarminhacaixadelistagemparaquequandoeucolocarocursoremqualqueritem(usandosetasparacima/baixo),umanovalistadeslizantenoladodireitoseráexibidaparaaqueleitemespecíficoelistadatodosos29clientes.Comoosdoword/excel,quandovocêclicanomenuArquivo,umsubmenuaparece,então,paracadaitemnomenudeslides,háummenudesegundonívelaparecendocomseusprópriositens.

Aquiestáocódigodaminhacaixadelistagem:

Gui,Add,ListBox,gActionvChoisew190h440c66ff00,Inquiry_Callback|OptOut_UnSub|OptOut_Callback|Dispute_Callback|Others_Others|-|S_Inquiry_Callback|S_OptOut_Unsub|S_OptOut_Callback|S_Dispute_Callback|S_Others_Others|-|S_Inquiry_Callback_N|S_OptOut_Callback_N|S_Dispute_Callback_N|-|Email_OptOut_IVR|-|S_Email_OptOut_IVR|S_Email_OptOut_IVR_2|-|dummyreturn^F1::Gui,Show,x400y180,ActionsAction:If((A_GuiEvent="DoubleClick") || (Trigger_Action))

    Gui, Submit

{

If (Choise = "Inquiry_Callback")

    {

        do this, do that

    }

If (Choise = "OptOut_UnSub")

    {

        do this, do that

    }

If (Choise = "OptOut_Callback")

    {

        do this, do that

    }

If (Choise = "Dispute_Callback")

    {

        do this, do that

    }

If (Choise = "Others_Others")

    {

        do this, do that

    }

If (Choise = "S_Inquiry_Callback")

    {

        do this, do that

    }

If (Choise = "S_OptOut_Unsub")

    {

        do this, do that

    }

If (Choise = "S_OptOut_Callback")

    {

        do this, do that

    }

If (Choise = "S_Dispute_Callback")

    {

        do this, do that

    }

and so on...

If (Choise = "dummy")

        MsgBox, Reserved for Additional Customer

}

return

#If WinActive("Actions ahk_class AutoHotkeyGUI")

    Enter::

        Trigger_Action := true

        GoSub, Action

        Trigger_Action := false

    return

#If

GuiEscape:

Gui, cancel

GuiClose: 

Gui, cancel   

Return

Espero que você entenda o que quero dizer.

    
por Faye 02.11.2017 / 11:15

1 resposta

0

Tente algo assim:

#NoEnv
#SingleInstance Force
DetectHiddenWindows, On
SetTitleMatchMode, 2

Gui, Add, ListBox, gAction vChoise w190 h440 c66ff00, Inquiry_Callback||OptOut_UnSub|OptOut_Callback|dummy
return

^F1:: Gui, Show, x400 y180, Actions

Action:
If ((A_GuiEvent = "DoubleClick") || (Trigger_Action))
{
    WinClose, _Actions.ahk - AutoHotkey v ahk_class AutoHotkey
    Gui, Submit, NoHide
    If (Choise = "dummy")
       MsgBox, Reserved for Additional Customer
    else
    {
        IfNotExist, %A_ScriptDir%\%Choise%_Actions.ahk
           GoSub, Create_Choise_Script
        Run, %A_ScriptDir%\%Choise%_Actions.ahk
    }
}
return

Create_Choise_Script:
FileAppend,
(
#NoEnv
#SingleInstance Force

; Gui, -Caption
Gui, Add, ListBox, gCustomerAction vChoise w500 h50, customer1||customer2|customer3
WinGetPos, X, Y, Width,, Actions ahk_class AutoHotkeyGUI
Xn := (X+Width)
Gui, Show, x'%Xn'% y'%Y'%, %Choise%_Actions
return

CustomerAction:
If ((A_GuiEvent = "DoubleClick") || (Trigger_CustomerAction))
{
    WinClose, Actions ahk_class AutoHotkeyGUI  ; after pressing the final choice (the Customer), the ListBox will CLOSE
    Gui, Submit 
    If (Choise = "customer1")
       MsgBox, customer1
    If (Choise = "customer2")
       MsgBox, customer2
    If (Choise = "customer3")
       MsgBox, customer3
     ExitApp
}
return


#If WinActive("%Choise%_Actions ahk_class AutoHotkeyGUI")

    Enter::
        Trigger_CustomerAction := true
        GoSub, CustomerAction
        Trigger_CustomerAction := false
    return

     Left::   ;  go back
         WinActivate, Actions ahk_class AutoHotkeyGUI
         ExitApp
     return

#If

GuiEscape:
GuiClose:
    ExitApp

), %A_ScriptDir%\%Choise%_Actions.ahk
Return


#If WinActive("Actions ahk_class AutoHotkeyGUI")

    Enter::
    Right::
        Trigger_Action := true
        GoSub, Action
        Trigger_Action := false
    return

#If

GuiEscape:
GuiClose: 
    Gui, cancel
Return
    
por 05.11.2017 / 10:33