GUICtrlCreateEdit Zeilenumbruch am Fensterrand?

  • Hallo
    Ich importiere ein Text von einer Word Datei ine in GUICtrlCreateEdit Feld. In diesem Feld editere ich den Text.
    Wenn der Text allerdings zu lang ist für das Edit Feld, wird nicht automatisch ein Zeilenumbruch eingefügt. Eigentlich will ich auch keinen echten Zeilenumbruch sondern nur das der Text in dem Edit Feld dann zweizeilig dargestellt wird. Wenn ich nachher den Text wieder von dem Edit Feld in ein anderes Textbearbeitungsprogramm einfügen will, soll hier kein Umruch an der Stelle sein. Es sollen nur echte Zeilenumbrüche die ich im Edit Feld durch Enter eingebe übernommen werden.
    Bekommt man das mit einem Edit Feld hin?
    Wenn ja wie?

    Gruß Autoirrer

  • Hi Autoirrer,

    vielleicht so, „ $ES_MULTILINE“ ! ;)

    Spoiler anzeigen


    Creates an Edit control for the GUI.
    GUICtrlCreateEdit ( "text", left, top [, width [, height [, style [, exStyle]]]] )

    Parameters
    text
    The text of the control.
    left
    The left side of the control. If -1 is used then left will be computed according to GUICoordMode.
    top
    The top of the control. If -1 is used then top will be computed according to GUICoordMode.
    width
    [optional] The width of the control (default is the previously used width).
    height
    [optional] The height of the control (default is the previously used height).
    style
    [optional] Defines the style of the control. See GUI Control Styles Appendix.

    default ( -1) : $ES_WANTRETURN, $WS_VSCROLL, $WS_HSCROLL, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL
    forced styles : $ES_MULTILINE, $WS_TABSTOP only if not $ES_READONLY
    exStyle
    [optional] Defines the extended style of the control. See Extended Style Table.


    Schönes WE und weiterhin
    viel Erfolg !

  • mhhh ;(
    Bei mir klappt das nicht, oder hab ich da noch was falsch. Mein Test Code

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Opt("GUIOnEventMode", 1)
    $Hauptform = GUICreate("Multiline", 924, 492, 193,115)
    $Uebersicht = GUICtrlCreateEdit("Hier bitte einen langen Text eingeben", 8, 40, 905, 297, BitOR($ES_AUTOVSCROLL, $ES_AUTOHSCROLL,$ES_WANTRETURN,$WS_VSCROLL,$ES_MULTILINE))
    GUISetState(@SW_SHOW)

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    Sleep(100)
    WEnd

    [/autoit] [autoit][/autoit] [autoit][/autoit]

    Wenn ich dann einen langen Text eingebe wandert der Text aus dem Fenster und wird nicht am Fensterrand umgebrochen. Wo liegt mein Fehler?

    Gruß Autoirrer

  • Lass halt mal $ES_AUTOHSCROLL weg, sonst ist es ja logisch, dass er Scrollt.

    Projekte: Keine größeren (und fertigen)
    Gegen Internetzensur:
    https://epetitionen.bundestag.de/index.php?acti…s;petition=3860
    (Zeichnungsfrist abgelaufen)
    __________________________________________________________________________________________________________________________________
    Dieser Beitrag wurde bereits 264 mal editiert, zuletzt von »Fast2« (30. Februar 2009, 12:99)