Jump to content

Rich Edit?


 Share

Recommended Posts

Is it possible to have a rich edit instead of just a normal edit control?

I need to beable to change colors of specific words in an edit box.

Thanks.

Have a look at this Topic


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Hmm.

That would be good but only 350 lines can be on the rtf edit...or it has a character limit since it cuts off the words on my last line in it.

Is there anyway to increase that?

Direct a polite PM to LazyCat describing what you are trying to do, and what you need. Maybe he can extend the length without too much trouble.

Gene

[font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right...

Link to comment
Share on other sites

Direct a polite PM to LazyCat describing what you are trying to do, and what you need. Maybe he can extend the length without too much trouble.

Alright.

Also does anyone know how to disable the RTF Edit? This doesn't work with it.

GUICtrlSetState ( $edit1, $GUI_DISABLE )
Link to comment
Share on other sites

Create it with the $WS_DISABLED style. Sadly, this turns the entire background gray and there's apparently no way to fix it (the usual commands for color-setting don't work). I don't know about the line limit problem, my rich edits have gone into the hundreds of lines without ever stopping, but I've never actually counted them.

Link to comment
Share on other sites

Hm, doesn't $WS_DISABLED also make it so you can't scroll?

That would be a big problem if it does.

Well I have 1 more question I thought of.

Is it possible to remove contents of the RTF Edit.

Say, remove the very first line of the rtf edit.

Link to comment
Share on other sites

Have you looked at this example of using the RTF control. Will give you full control of the RTF:

http://www.autoitscript.com/forum/index.ph...topic=13161&hl=

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Link to comment
Share on other sites

That doesn't look like the same one I am using.

I'm using LazyCats RTF plugin.

I think that LazyCats is a wrapper around the same control, but does not give you access to all the methods and properties.

“Give a man a script; you have helped him for today. Teach a man to script; and you will not have to hear him whine for help.”AutoIt4UE - Custom AutoIt toolbar and wordfile for UltraEdit/UEStudio users.AutoIt Graphical Debugger - A graphical debugger for AutoIt.SimMetrics COM Wrapper - Calculate string similarity.

Link to comment
Share on other sites

Make sure you've the latest beta version of AutoIt

Download: http://www.autoitscript.com/autoit3/files/beta/autoit/

Download Microsoft's RichText Edit control from here:

http://www.ascentive.com/support/new/suppo...me=RICHTX32.OCX

Register the control:

Windows NT or 2000:

regsvr32 \WINNT\system32\RICHTX32.OCX

Windows XP:

regsvr32 \windows\system32\RICHTX32.OCX

User kjactive's rich text example as the starting point:

http://www.autoitscript.com/forum/index.php?showtopic=13161

Refer the MSDN for furthur properties/methords of RichText control:

http://msdn.microsoft.com/library/default....boxctltasks.asp

This is by far the best way I've found for a working Rich Text box in AutoIt.

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...