Hab da mal ne frage und zwar,
wollte ich mein GUI Hauptfenster zum scrollen bringen, denn da solln viele label untereinander drauf, aber das fenster soll dabei kompakt bleiben, dachte mir eig. das is ganz simple einfach mit $WS_VSCROLL und das hat sich, aber das war ja mal zu früh gefreut^^.Wenn ich in Koda das fenster verlängere und ganz unten was einfüge und das fenster anschließent wier kürzer mache, bekomm ich ja auch rechts ne scrollbar, blöd das die nich einfach aufs script übernommen wird. Gibts da wieder extrabefehle für oder muss man an $WS_VSCROLL noch etwas anfügen? Hab in der Hilfe nix brauchbares dazu gefunden und google konnte mir auch mal wieder nicht Helfen.
Hier mal ein beispiel wie ich es meine:
PHP Code:
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("Form1", 354, 435, 192, 124)
Global $Label1 = GUICtrlCreateLabel("Label1", 16, 160, 36, 17)
Global $Label2 = GUICtrlCreateLabel("Label2", 8, 56, 36, 17)
Global $Label3 = GUICtrlCreateLabel("Label2", 11, 117, 36, 17)
Global $Label4 = GUICtrlCreateLabel("Label2", 13, 223, 36, 17)
Global $Label5 = GUICtrlCreateLabel("Label2", 14, 264, 36, 17)
Global $Label6 = GUICtrlCreateLabel("Label2", 21, 316, 36, 17)
Global $Label7 = GUICtrlCreateLabel("Label2", 11, 387, 36, 17)
Global $Label8 = GUICtrlCreateLabel("Label2", 19, 452, 36, 17)
Global $Label9 = GUICtrlCreateLabel("Label2", 14, 514, 36, 17)
Global $Label10 = GUICtrlCreateLabel("Label2", 8, 584, 36, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Andere möglichkeit:
Ich könnte es natürlich auch in eine Listbox schreiben, die die ganze form ausfüllt, dann hab ich das problem mit dem scrollen nichtmehr, aber dafür das problem das ich nicht weis wie man durch das anklicken der einzelnen listbox items ein neues GUI fenster öffnet, was die label in meinem ersten beispiel tun solln.
Klick auf Listboxeintrag 1 öffnet sich GUI X, Klick auf Listboxeintrag 2 öffnet sich GUI Y, usw....
Beispiel:
PHP Code:
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("Form1", 459, 255, 192, 124)
Global $List1 = GUICtrlCreateList("", 0, 0, 457,253,BitOR($WS_VSCROLL,$WS_BORDER))
GUICtrlSetData(-1, "1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Danke schonmal für eure hilfe
Mfg






