Class RichEdit - update on 2015-04-14 (v0.1.05.00)

Post your working scripts, libraries and tools
User avatar
moefr01
Posts: 62
Joined: 25 Nov 2015, 09:01
Location: Germany

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

04 Feb 2018, 09:35

thx just me for this awesome class... :clap:
hope DigiDon will continue that project properly to answer extraordinary questions from the community.
So, here's my first one:
Starting your GUI, I paste a WordPad/Word-table via clipboard successfully. Resizing the table-cells works fine, but is there any possibility to merge/unmerge cells (like Word does)???
DigiDon
Posts: 176
Joined: 19 May 2014, 04:55
Contact:

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

05 Feb 2018, 05:27

Hello moefr01
Yes I have made advancements on the mentioned improvements
See RichEdit : New Features to All
so I will be creating a new topic with improved class in the following days.

About tables I was wondering too.
The thing is it seems table manipulation will be extremely complicated to rely on RichEdit capabilities.

The biggest improvement I've made is that the RichEdit class will supports all OLE objects meaning you can import any file in a note and edit it in the appropriate program.
I think the better approch is to embed tables and work on them from Excel which is great at what it does.

See This preview
The only bad point for now is I have been unable to show the preview of the table as in this example direclty by dragging an excel file.
When I inserted with Word and then displayed it in AHK it was working fine though so I will try to investigate later why.
Edit: Might be some info here : REOleCb.cpp

The rest of this post will be used for reference

Important point is that a lot of features and capabilities depend on the version of the RichEdit control you are using.
As this class is intended to work for most people it will concentrate on the RichEdit 4.1 version which is shipped with Windows 7.
Newer versions of window ships with newer version of the controls especially with newer version of office dll that you could use.
A list I have found here : RichEdit versions
The latest version being RichEdit 8.0 which apparently have new methods for tables RichEdit 8.0 TOM Table Interfaces and other improvements

It seems ITextRow interface can also manipulate tables in some ways.
I think RichEdit 4.1 has some table capabilites referenced here.
EverFastAccess : Take Notes on anything the Fast way: Attach notes, Set reminders & Speed up research in 1 gesture - AHK topic
AHK Dynamic Obfuscator L - Protect your AHK code by Obfuscation - AHK topic
QuickModules for Outlook : Sort Outlook emails very quickly to multiple folders - AHK topic

Coding takes lots of time and efforts. If I have helped you or if you enjoy one of my free projects, please consider a small donation :thumbup:
User avatar
moefr01
Posts: 62
Joined: 25 Nov 2015, 09:01
Location: Germany

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

08 Feb 2018, 12:34

Due to the fact that I'm terribly short of time... found another work-around for inserting tables: insert a rtf-file with predefined tables out of word and linked with a button/shortcut in the GUI.
...works fine!
I'm curious about DigiDon's further devs :) :?:
DigiDon
Posts: 176
Joined: 19 May 2014, 04:55
Contact:

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

09 Feb 2018, 08:56

Hi moefr01,

Not sure what you mean by "out of word" and "linked with a button".
Could you elaborate?
What are you trying to achieve?

Anyway I have investigated a bit more tables.
There are no code implementation of an Insert Column function that I could find, which is really a pitty...

But I've figured out how you can insert an RFT table of x rows and y columns programmaticaly.
The problem is as I said I found no way of inserting a new column afterwards, not even speaking of merging cells.
You can nevertheless add new rows with the TAB key.
Image

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



More interestingly, I have prototyped a way you can create an Excel table of x rows and y columns that will be embedded into the RichEdit.
So the content is displayed directly, and on double-clic you can edit the table in Excel and the preview will be updated.
Image
In case anyone's is interested here is how the code looks like:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

EverFastAccess : Take Notes on anything the Fast way: Attach notes, Set reminders & Speed up research in 1 gesture - AHK topic
AHK Dynamic Obfuscator L - Protect your AHK code by Obfuscation - AHK topic
QuickModules for Outlook : Sort Outlook emails very quickly to multiple folders - AHK topic

Coding takes lots of time and efforts. If I have helped you or if you enjoy one of my free projects, please consider a small donation :thumbup:
User avatar
moefr01
Posts: 62
Joined: 25 Nov 2015, 09:01
Location: Germany

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

09 Feb 2018, 15:52

DigiDon... sorry for misunderstanding, here is the explanation:
First I created a new rtf-file with inserted tables (<clipboard<Word), saved it locally and at least used the function FileInsert of Poor Man‘s Rich Edit for that tables.rtf, added a button for further use. ;)
DigiDon
Posts: 176
Joined: 19 May 2014, 04:55
Contact:

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

10 Feb 2018, 11:50

Haa, interesting ! ;)

But now you can use my function above to have the number of columns and row you want directly.

You can put two inputbox to ask for value for example or directly use the interface I plan to introduce:
[GUI] Grid selection GUI
EverFastAccess : Take Notes on anything the Fast way: Attach notes, Set reminders & Speed up research in 1 gesture - AHK topic
AHK Dynamic Obfuscator L - Protect your AHK code by Obfuscation - AHK topic
QuickModules for Outlook : Sort Outlook emails very quickly to multiple folders - AHK topic

Coding takes lots of time and efforts. If I have helped you or if you enjoy one of my free projects, please consider a small donation :thumbup:
DigiDon
Posts: 176
Joined: 19 May 2014, 04:55
Contact:

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

12 Feb 2018, 18:00

Hi,

There are still room for improvement to understand and implement clearly the OLE features of Rich Edit into the class and the sample,.
Therefore there are some delays before a proper release.

Nevertheless, for those who would like to start right away I think it is good to release the major part of what was achieved recently.

It is now possible to embed any document into the Rich Edit control

Thanks to the OLE callback interface implementation done by just me and myself.

Many thanks to just me for all the help, work and knowledge you have brought/are still bringing.


Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Enjoy! ;)
EverFastAccess : Take Notes on anything the Fast way: Attach notes, Set reminders & Speed up research in 1 gesture - AHK topic
AHK Dynamic Obfuscator L - Protect your AHK code by Obfuscation - AHK topic
QuickModules for Outlook : Sort Outlook emails very quickly to multiple folders - AHK topic

Coding takes lots of time and efforts. If I have helped you or if you enjoy one of my free projects, please consider a small donation :thumbup:
User avatar
moefr01
Posts: 62
Joined: 25 Nov 2015, 09:01
Location: Germany

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

13 Feb 2018, 04:32

DigiDon wrote:Haa, interesting ! ;)

But now you can use my function above to have the number of columns and row you want directly.

You can put two inputbox to ask for value for example or directly use the interface I plan to introduce:
[GUI] Grid selection GUI


thanks DigiDon... your hint works fine. ;)
Found out that the frame (visible in rtf) of an inserted table is invisible in a converted pdf-file... in contrary to my clipboard-pasting. Looks :ugeek: fine!
DigiDon
Posts: 176
Joined: 19 May 2014, 04:55
Contact:

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

13 Feb 2018, 05:33

moefr01 wrote:Found out that the frame (visible in rtf) of an inserted table is invisible in a converted pdf-file... in contrary to my clipboard-pasting. Looks :ugeek: fine!


Right, I figured this out as well. I've finally managed to add proper borders.
Was not simple because the code from a Word table is quite awfully complicated and RTF syntax for table is... erf!

Anyway here is an improved version that will display table borders well in other programs (at least it should. Works in Word):

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



Notice that I changed from WidthCm (centimeters) to Pixels.

Right now I'm calling it this way so the total width of the table is (such as in Word) always approximately equals to a page width.

Code: [Select all] [Download] GeSHi © Codebox Plus

RN_InsertRTFTable(RE2,GridGUICols,GridGUIRows,786/GridGUICols)
EverFastAccess : Take Notes on anything the Fast way: Attach notes, Set reminders & Speed up research in 1 gesture - AHK topic
AHK Dynamic Obfuscator L - Protect your AHK code by Obfuscation - AHK topic
QuickModules for Outlook : Sort Outlook emails very quickly to multiple folders - AHK topic

Coding takes lots of time and efforts. If I have helped you or if you enjoy one of my free projects, please consider a small donation :thumbup:
burque505
Posts: 547
Joined: 22 Jan 2017, 19:37

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

13 Feb 2018, 08:25

@DigiDon, @just me, thank for this class and your continued work on it.
Regards,
burque505
truekefir
Posts: 16
Joined: 29 Jul 2017, 13:57

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

24 Aug 2018, 03:25

Hi!

Is there any better way to insert formatted text into table other than adding it manually like I did in this script?


Code: [Select all] [Expand] [Download] (Untitled.ahk)GeSHi © Codebox Plus

truekefir
Posts: 16
Joined: 29 Jul 2017, 13:57

Re: Class RichEdit - update on 2015-04-14 (v0.1.05.00)

18 Sep 2018, 14:19

probably worthy addition to library? Hope I did it right
both together allowing to select line containing caret for future use, copy, clear, duplicate, move between controls, etc.

Code: [Select all] [Expand] [Download] (Untitled.ahk)GeSHi © Codebox Plus


Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 20 guests