Sign in to follow this  
Followers 0
bvr

Text Editor: HOWTO GOTo Next Line

6 posts in this topic

I am making a text editor, mainly for writers. It looks alot like notepad atm until I add to it. But I am unsure how in the text form to make a new line. I could type all day and the line will just keep going horizontal. I want it to make a new line once I get to the end of the form on the right side.

Share this post


Link to post
Share on other sites

look at the different styles for GUICtrlCreateEdit () like $ES_AUTOVSCROLL and $WS_VSCROLL

Share this post


Link to post
Share on other sites

probably some kind of loop that counts or subtracts keystrokes or amount of characters entered.


Triton

Share this post


Link to post
Share on other sites

Set the style to $ES_WANTRETURN.

Share this post


Link to post
Share on other sites

I am making a text editor, mainly for writers. It looks alot like notepad atm until I add to it. But I am unsure how in the text form to make a new line. I could type all day and the line will just keep going horizontal. I want it to make a new line once I get to the end of the form on the right side.

Like when you have wordwrap turned on in Notepad?

#include <EditConstants.au3>
#include <WindowsConstants.au3>

$gui = GUICreate('', 200, 200)
GUICtrlCreateEdit('Try this', 0, 0, 200, 200, BitOr($ES_WANTRETURN, $WS_VSCROLL, $ES_AUTOVSCROLL))
GUISetState()

While 1
    $gm = GUIGetMsg()
    Switch $gm
        Case -3; $GUI_EVENT_CLOSE
            ExitLoop
    EndSwitch
WEnd

Share this post


Link to post
Share on other sites

thats works great, thanks!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0