thebeginner
Anmeldedatum: 03.02.2006 Beiträge: 29
|
Verfasst am: Di Aug 22, 2006 1:17 pm Titel: Control-Inhalt löschen |
|
|
Hallo alle zusammen,
Ich hab efolgendes Testprogramm geschrieben, das ein Problem verdeutlicht.
| Code: | ; Menu
Menu, Test, Add, Menu1, ShowControlMenu1
Menu, Test, Add, Menu2, ShowControlMenu2
Menu, MyMenuBar, Add, Testmenu, :Test
Gui, Menu, MyMenuBar
; Controls für Menu1
Gui, Add, Edit, x20 y20 w100 h20 vEdit1
Gui, Add, ComboBox, x20 y50 w100 h vComboBox1, 1|2|3
; Controls für Menu2
Gui, Add, Radio, x20 y20 w100 h20 vRadio2, Testradio
Gui, Add, Checkbox, x20 y50 w100 h20 vCheckbox2, TestCheckbox
GoSub, HideControlMenu1
Gosub, HideControlMenu2
Gui, Show,w200 h100, Testprogramm
Return
; Hide-Anweisungen
HideControlMenu1:
GuiControl, Hide, Edit1
GuiControl, Hide, ComboBox1
Return
HideControlMenu2:
GuiControl, Hide, Radio2
GuiControl, Hide, Checkbox2
Return
; Show-Anweisungen
ShowControlMenu1:
GoSub, HideControlMenu2
GuiControl, Show, Edit1
GuiControl, Show, ComboBox1
Return
ShowControlMenu2:
GoSub, HideControlMenu1
GuiControl, Show, Radio2
GuiControl, Show, Checkbox2
Return |
Wenn nun eine Menü aufrufe und die Controls auswähle bzw. etwas eintrage, diese dann nochmals aufrufe, bleibt deren Inhalt des letzten Aufrufs erhalten. Wie kann ich nun den Inhalt der Controls löschen, so das diese wie beim ersten Aufruf aussehen.
Bis dann
thebeginner |
|