Wie füge ich SubListBox meiner Main ListBox hinzu?

343
Faye

Ich habe bereits meine ListBox entwickelt (Screenshot im Anhang).

Wie füge ich SubListBox meiner Main ListBox hinzu?

Aufgelistet als:

  1. Rückfrage_ Rückruf

  2. OptOut_Unsub

  3. OptOut_Callback

  4. Dispute_Callback

  5. Andere_Sonstiges

  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

Ich habe 29 Kunden, die sich auf eine der oben genannten Kategorien beziehen können. Dies bedeutet, dass die Vorlagen 16 x 29 = 464 sind.

Meine Frage ist, wie kann ich mein Listenfeld so ändern, dass, wenn ich den Cursor auf ein Element setze (mit den Aufwärts- / Abwärtspfeilen), ein neues, auf der rechten Seite verschiebbares Listenfeld für das betreffende Element angezeigt wird und alle 29 aufgelistet sind Kunden. Wie in Word / Excel, dass beim Klicken auf Datei-Menü ein Untermenü angezeigt wird, werden für jedes Element im Folienmenü das Menü der 2. Ebene mit eigenen Elementen angezeigt.

Hier ist der Code meiner Listbox:

Gui, Add, ListBox, gAction vChoise w190 h440 c66ff00, 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|-|dummy  return  ^F1:: Gui, Show, x400 y180, Actions  Action:  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 

Ich hoffe, du verstehst was ich meine.

0

1 Antwort auf die Frage

0
user3419297

Versuchen Sie etwas so:

#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 
Hi, das ist schön. Können Sie es bitte ein bisschen bearbeiten. Wenn ich zum Beispiel den Cursor auf Inquiry_Callback setze und dann merkte, dass es nicht das ist, was ich will, um zurück zu kehren, muss ich ESCAPE drücken, um wieder ein anderes auszuwählen (z. B. OptOut_Unsub). Können Sie es wie folgt machen: . Vielen Dank. Faye vor 6 Jahren 0
Nachdem Sie die endgültige Auswahl (den Kunden) gedrückt haben, schließt sich die ListBox und das Programm führt die entsprechende Aktion aus. Wenn ich in Ihrem angegebenen Code eine endgültige Option wähle (dh Kunde 1), bleibt die ListBox immer noch dort. Vielen Dank. Faye vor 6 Jahren 0