Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Jun Tangunan
  Where is Jun Tangunan?
 Cabanatuan
 Philippines
 Jun Tangunan
 To: Bernard Bout
  Where is Bernard Bout?
 Brisbane
 Australia
 Bernard Bout
 Tags
Subject: RE: Enhanced RTF Tool Revealed
Thread ID: 246117 Message ID: 246179 # Views: 70 # Ratings: 0
Version: Visual FoxPro 9 Category: Active X Controls & OLE Automation
Date: Sunday, November 22, 2009 2:38:02 AM         
   


Hello Bernard,

> > >
> Jun
>
> Just some points:
>
> 1. The height of the form is about 818p. So on my monitor, because you have AutoCenter on and the Titlebar hidden, the form actually is not centered properly and I am unable to access the title bar. I changed it to AutoCenter Off and resized the form and now all is well since my resolution is 1280x800.


Originally, WindowState property is set to 2. I changed it back to 0 before posting as the initial display of my notes does not look cool in my LCD here (I have 1440x900). To fix that problem, you can simply set WindowState=2. One thing that it will do though is cover everything including the taskbar.


>
> 2. What does the button (2nd row,4th from left) do? It has no code behind it.


That is for the font color. It is actually not a button as I think you knew. It is a container with 1 shape as border, an image of letter A representing font color, and the rectangle (another shape). I guess when I decided to "hot-track", the purpose of font color is lost (I did not realize it till now). The rectangle's purpose though is to popup the color selection so you can change the color of the active text selections.

>
> 3. What is the purpose of the Format Painter button (2nd row,10th from left)?
>
>

Same as in Word I believe. You click a text, click the format painter, it then saves all settings (font name, size, color, justification, bold settings, underline, and italic into UD Properties; then you just have to highlight another set of text and the format from where you first clicked format painter will be reflected on the highlighted texts.

4. When I select any text and press the BACKSPACE key the dialog to "Open Picture" pops up. Backspace should delete the selected text.
>
> 5. If I create a NEW document and hit the backspace key, the "Open Picture" dialog pops up. If I then click Cancel, whatever is in my clipboard (text) gets pasted into the document!
>


That I have not tested. This tool is very new, I created it just recently and I focused more on the GUI after I thought I already implemented my enhancements.


> 6. If I have previously clicked the "Show RTF codes" button, and then click "New Note" the RTF is cleared but the editbox still shows the RTF codes. This is when the page is blank and there is no RTF.


That I did not bother to clear. Pus there is no other purpose of that yet aside from plain showing the codes. Maybe I will add more usage later on my side. :-U

>
> 7. There is no way to change the colour of any text. Also the RTF somehow retains the previous colour codes.
>


See # 2 answer. Click on the rectangle bar.

> 8. For me the "Insert Image" did not work. If I click the button, the dialog appears, and I navigate and select an image and the image is not inserted. Instead the text that is in the clipboard gets inserted. Anyway I fixed this by copying the system.app to the same directory. I know you mention this in your blog.
>

> 9. What does the 3rd button "Update Entry" do?
>


That is part of my Tree View Cataloging feature. It updates the memo content of the current node with the content of the RTF control. So I did not include it there, I failed to remove it though on the sample.

> 10. The property of the RTF HideSelected should be .F. so that the selection does not disappear when you lose focus by clicking on a button.
>


Nice tip! I will do that here on my side. Others should do it well also on the sample they downloaded.


> Finally if I could select text and images from a web page and paste directly into the document that would be great. Currently you can either paste text OR a sincle copied image, not both. I know that MSWord has this ability. I use it often to copy from a web page and paste and then reformat in word before printing.
>


I still haven't thought about it. When we copy from web page and paste it inside the RTF control, it became pure text. So what I do on my side is paste those first in MSWord, then copy it again from word to the RTF control. That is when it will accept both text and images plus retaining the formats.


> Other than these points this could be a great tool to use instead of Word and since you have kindly posted the source, is completely configurable and can be enhanced.
>
> Thanks a lot for this.
>
> Bernard
>
> ** If you see someone without a smile, give em one of yours :) **
> My Blog


My pleasure! ;-)

Jun Tangunan




COMPLETE THREAD
Enhanced RTF Tool Revealed Posted by Jun Tangunan @ 11/21/2009 6:42:39 AM
RE: Enhanced RTF Tool Revealed Posted by Hyder Zaman @ 11/21/2009 10:46:49 AM
RE: Enhanced RTF Tool Revealed Posted by Jun Tangunan @ 11/21/2009 3:23:18 PM
RE: Enhanced RTF Tool Revealed Posted by Hyder Zaman @ 11/23/2009 3:37:42 PM
RE: Enhanced RTF Tool Revealed Posted by Jun Tangunan @ 11/23/2009 4:58:55 PM
RE: Enhanced RTF Tool Revealed Posted by Bernard Bout @ 11/24/2009 5:02:10 AM
RE: Enhanced RTF Tool Revealed Posted by Jun Tangunan @ 11/24/2009 2:06:13 PM
RE: Enhanced RTF Tool Revealed Posted by Bernard Bout @ 11/21/2009 4:08:18 PM
RE: Enhanced RTF Tool Revealed Posted by Jun Tangunan @ 11/22/2009 2:38:02 AM
RE: Enhanced RTF Tool Revealed Posted by Jun Tangunan @ 11/22/2009 5:03:04 AM
RE: Enhanced RTF Tool Revealed Posted by Jun Tangunan @ 11/22/2009 1:43:31 PM
RE: Enhanced RTF Tool Revealed Posted by Sen 1668 @ 12/20/2009 6:40:34 AM
RE: Enhanced RTF Tool Revealed Posted by Jun Tangunan @ 12/20/2009 8:16:06 AM