Zen Posted December 30, 2005 Posted December 30, 2005 This is my Problem. Run this Script an you see it. expandcollapse popup#include <GUIConstants.au3> opt("GUIOnEventMode", 1) opt("GUICloseOnESC", 0) opt("GUIResizeMode", 0) opt("TrayIconHide", 1) $mainwindow = GUICreate("GUI-Window", 400, 350) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") $filemenu = GUICtrlCreateMenu("Datei") $toolmenu = GUICtrlCreateMenu("Tool") $helpmenu = GUICtrlCreateMenu("?") $toolitemA = GUICtrlCreateMenuItem("MenueA", $toolmenu) GUICtrlSetOnEvent($toolitemA, "MenueA") $toolitemB = GUICtrlCreateMenuItem("MenueB", $toolmenu) GUICtrlSetOnEvent($toolitemB, "MenueB") $optionitem = GUICtrlCreateMenuItem("Option", $helpmenu) GUICtrlSetOnEvent($optionitem, "Option") $infoitem = GUICtrlCreateMenuItem("Info", $helpmenu) GUICtrlSetOnEvent($infoitem, "Info") $exititem = GUICtrlCreateMenuItem("Exit", $filemenu) GUICtrlSetOnEvent($exititem, "_Exit") $trennlineitem = GUICtrlCreateMenuItem("", $filemenu, 2) $byZen = GUICtrlCreateMenuItem("by Zen", $filemenu) GUICtrlSetState(-1, $GUI_DISABLE) GUISetState() $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() WEnd Func MenueA() WinSetTitle("GUI-Window", "", "GUI-window | Menue A") GUICtrlCreateLabel("Menue A", 160, 20) GUICtrlCreateLabel("A long Text" & @CRLF & "" & @CRLF & "aaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbcccccccccccccccccccdddddddddddddddddddddeeeeeeeeeeeeeeeeeeeeff fffffffffffgggggggggggg", 50, 75, 300, 100) GUICtrlCreateLabel("X-Achse", 125, 160) GUICtrlCreateLabel("Y-Achse", 200, 160) EndFunc Func MenueB() WinSetTitle("GUI-Window", "", "GUI-window | Menue B") GUICtrlCreateLabel("Menue B", 170, 25) GUICtrlCreateLabel("A long Text" & @CRLF & "" & @CRLF & "mndakondonasdonapdinaidnasidnasasjduiapjwrkfodaeü füiü iiasidaipüpia pidopasidüiawroiir üapsdaud opiaü uüa üasuiwüiaias", 40, 90, 280, 100) GUICtrlCreateLabel("X-Achse", 130, 170) GUICtrlCreateLabel("Y-Achse", 210, 170) EndFunc Func Option() $CommanderCheck = GUICtrlCreateCheckbox("Commander?", 20, 30) GUICtrlSetOnEvent($CommanderCheck, "CommanderCheck") $CommanderRead = IniRead("Option.ini", "Option", "Commander", "Not found") If $CommanderRead = "20" Then GUICtrlSetState($CommanderCheck, $GUI_CHECKED) GUICtrlCreateGroup("Option", 10, 10, 160, 170) GUICtrlCreateGroup("Free", 190, 10, 200, 170) GUICtrlCreateGroup("Path of a Program", 10, 200, 380, 140) GUICtrlCreateLabel("Path", 20, 220, 100, 20) $Path = IniRead("Optionen.ini", "Option", "Path", "Not found") $SSPath = GUICtrlCreateInput($Path, 20, 240, 360, 20) $SSPathRead = GUICtrlRead($SSPath) IniWrite("Option.ini", "Option", "Path", $SSPathRead) EndFunc ;==>Optionen Func Info() MsgBox(64, "Info", "blub!") EndFunc ;==>Info Func _Exit() If @GUI_WinHandle = $mainwindow Then MsgBox(0, "Zen sagt Ciao Ciao", "Vielen Dank, dass Sie sich für Zen's Script entschieden haben! Programm wird beendet...", 5) Exit EndIf EndFunc ;==>Beenden Can i fix it?
Developers Jos Posted December 30, 2005 Developers Posted December 30, 2005 This is my Problem.Run this Script an you see it.Can i fix it?Maybe you need to explain what you want?Don't understand why you would want to create COntrols eveytime you click on a menu item... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Zen Posted December 30, 2005 Author Posted December 30, 2005 A new Menu Item make new Text. But, when i click on the frist Menu item, the text is coming well. But when i click on the second menu item, all text is there, from the first and the second. (My english is bad, Sorry) Run the Script and click on "Menu A", then "Menu B". You see the Problem
rambo3889 Posted December 31, 2005 Posted December 31, 2005 then maybe use something like this Func second() guictrldelete(Your labels) Guictrlcreatelabel("text") EndFunc My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! youre the best in town Fight!
Zen Posted December 31, 2005 Author Posted December 31, 2005 Hmm, good idea. But when the gui is much bigger, what then?
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now