Jump to content

Memo display, edit mode


sness
 Share

Recommended Posts

Hey there everyone.

Is there a way to retrieve text in a file and display it in a window on a custom GUI so the user can cut and paste the text into a document of their choice? I envision a text box with a scroll bar if too large to fit in the area provided.

Thanks for your guidance on this.

Sue

Link to comment
Share on other sites

  • 3 months later...

Hey there everyone.

Is there a way to retrieve text in a file and display it in a window on a custom GUI so the user can cut and paste the text into a document of their choice? I envision a text box with a scroll bar if too large to fit in the area provided.

Thanks for your guidance on this.

Sue

Hi Sue,

I am new to Autoit and have been looking for help to do exactly what you have mentioned. Is it possible for you to post the code you used to display text in a scrolling text box?

Thanks

Alan :)

Link to comment
Share on other sites

Hi Sue,

I am new to Autoit and have been looking for help to do exactly what you have mentioned. Is it possible for you to post the code you used to display text in a scrolling text box?

Thanks

Alan :)

This will do the trick

#include <GUIConstants.au3>

$textfile = FileOpen("C:\boot.ini",0) ;Any text file will work
$text = FileRead($textfile)
FileClose($textfile)

GUICreate("Displaying a text file" , 400,400)

GUICtrlCreateEdit($text,5,5,390,390)
GUISetState(@SW_SHOW)
While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then
        ExitLoop
    EndIf
WEnd
Edited by arcticflame
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...