Beiträge von michelw

    I have WPTools version 5.23.3 and the following simple HTML code does not display anything from the <HEAD> section.

    Only "Body section" gets displayed (even if I specify the DOCTYPE, it still does not get displayed). I have set LayoutMode = wplayFullLayout (which was the default by the way). Is there an option somewhere in the TWPRichText object to display the <HEAD> section. If not, how can I display this <HEAD> section.

    Thanks,

    Michel W.

    I don't have any special checkbox. I am using the standard WPTools checkbox. Here is my code that creates a WPTools checkbox and a picture object.

    -When I click on the checkbox, it triggers an OnTextObjectClick event for the checkbox and also an OnClick event, which is correct.

    -When I click on the picture or anywhere else on the page, it only triggers an OnClick event, which is correct.

    -When I press the shift key an click on the picture, it triggers an OnTextObjectClick event for the picture and also an OnClick event, which is correct.

    -When I press the shift key an click on the checkbox, it triggers an OnTextObjectClick event for the picture and also an OnClick event, which is NOT correct because I clicked on the checkbox and not on the picture.


    Now, if I do the same tests but with the DONTREQ_SHIFT_FOR_UNDER_TEXT_OBJ conditional define.


    -When I click on the checkbox, it triggers an OnTextObjectClick event for the picture object and also an OnClick event, which is NOT correct because I clicked on the checkbox and not the picture.

    -When I click on the picture, it triggers an OnTextObjectMouseDown event for the picture and also an OnClick event, which is correct.


    What I need to do is to be able to detect which TWPTextObj that the user really clicked on even if the picture is under text and even if some other TWPTextObj objects appear on top of the picture. So if a checkbox appears on top of a picture and the user clicks on this checkbox, I need OnTextObjectClick, OnTextObjectDblClick and OnTextObjectMouseDown to be triggered for checkbox object, but if the user clicks on the picture object, I need OnTextObjectClick, OnTextObjectDblClick and OnTextObjectMouseDown to be triggered for the picture object.


    I hope that gives you all of the information you need to tell me if this is a problem with WPTools or if you have some other way to make this work.


    Thanks,

    I did more testing and here is what I need to accomplish.

    I need to be able to detect the true TWPTextObj object that the user clicked on or double clicked on even if the object is displayed on top of a picture object which is under text.

    With the compiler conditional define DONTREQ_SHIFT_FOR_UNDER_TEXT_OBJ, if I have a picture object that is under text but I also have some checkboxes and radiobuttons objects that appear on top of the picture, the OnTextObjectClick, OnTextObjectDblClick and OnTextObjectMouseDown event will always return me the picture object even if I clicked on a checkbox or a radio button (which I think is not correct).

    Without the compiler conditional define DONTREQ_SHIFT_FOR_UNDER_TEXT_OBJ, which is the default, if I have a picture object that is under text but I also have some checkboxes and radiobuttons objects that appear on top of the picture, the OnTextObjectClick, OnTextObjectDblClick and OnTextObjectMouseDown event will trigger properly when I click on a checkbox or a radio button, but will not trigger when I click on the picture (I guess this is normal since DONTREQ_SHIFT_FOR_UNDER_TEXT_OBJ is NOT defined). If I press the shift key when clicking on a checkbox or a radiobutton, the object clicked on that is returned is NOT the checkbox or radiobutton but the picture.

    What I need to do is to be able to detect which TWPTextObj that the user really clicked on even if the picture is under text and even if some other TWPTextObj objects appear on top of the picture. So if a checkbox appears on top of a picture and the user clicks on this checkbox, I need OnTextObjectClick, OnTextObjectDblClick and OnTextObjectMouseDown to be triggered for checkbox object, but if the user clicks on the picture object, I need OnTextObjectClick, OnTextObjectDblClick and OnTextObjectMouseDown to be triggered for the picture object.

    Essentially, all TWPTextObj objects except picture object should have a higher priority than picture objects when clicked.

    What I am trying to do is to detect the TWPTextObj image object, which is in fact a TWPOImage object, that I double clicked on even if this image object is under text and relative to paragraph (mode = [wpobjObjectUnderText, wpobjRelativeToParagraph]).

    If the image object that I create only has the mode property to either wpobjRelativeToParagraph or wpobjObjectUnderText I do receive an OnTextObjectDblClick event. This problem only happens when mode = [wpobjObjectUnderText, wpobjRelativeToParagraph] and I double click on an image object, no OnTextObjectDblClick event gets triggered.

    I know that I can press the shift keyboard key when I double click on the image, but I want the OnTextObjectDblClick event to be triggered with having to press the shitf key.

    Note: this problem happens with WPTools version 5. I don't know if this problem exists with WPTools 6.

    In Microsoft Word for example, you can draw directly in your text document and those drawing are also saved in your document. You can also use the zoom if needed.

    Is there a way to have an embedded graphic editor in WPTools so that the user can draw freehand, lines, circles or rectangles ?

    OnTextObjectMouseDown event is not triggered with underText image.

    I have multiple checkboxes, radio buttons and edit fields in my document.

    I also have an image field which has it's underText property set:

    Code
    obj.Mode := obj.Mode + [wpobjObjectUnderText]

    When I click on any fields (text, radio or checkbox) which is not over my image, I receive the following events:

    Code
    OnTextObjectMouseDownOnTextObjectClickOnClick

    When I click on any fields (text, radio or checkbox) which is over my image, I receive the following events:

    Code
    OnTextObjectClick
    OnClick

    Can you please tell me why I don't receive a OnTextObjectMouseDown event on my fields that are displayed over my UnderText image.

    Another problem that I noticed, is that if I have an UnderText image field and I click on this image, I don't receive a OnTextObjectClick event, I only get a OnClick event. This is very important, since I need to detect which image field object that the user has just clicked.

    Currently it is possible to have no text wrapping of a table cell by setting ASet(WPAT_NoWrap, 1) on the TParagraph of the cell. For this to work properly, you need to have [wpAllow_WPAT_NoWrap] in the FormatOptionsEx.

    What I need to have is to be able to set a similar WPAT_NoWrap property on a TWPTextObj object instead of the TParagraph.

    Here is a visual sample of what I need to have:

    Code
    +--------------------+
    |This text must be   |
    |displayed on        |
    |multiple lines: []  |
    +--------------------+

    The [ ] placeholder is an input edit field create with InputEditField. I want the text "This text must be displayed on multiple lines:" to be displayed on multiple lines, but I want the text entered in between the [ ] markers to be displayed on a sigle line with no wrapping.

    Is this possible ?

    The only workaround I found is putting the InputEditField on a seperate line in the cell or to create another cell to the right containing only the InputEditField.


    Michel W.

    If I use InputString with a CRLF (#13#10), my lines get displayed with an extra line feed.

    For example

    Code
    WPRichText1.InputString('LINE1' + #13#10 + 'LINE2' + #13#10 + 'LINE3' + #13#10);

    get's displayed as

    Code
    LINE1LINE2LINE3

    instead of

    Code
    LINE1
    LINE2
    LINE3

    Since the plain text that I want to display comes from a database and that plain text uses the DOS format for CRLF, my text get's displayed with an extra line feed.

    Is there a property in WPTools 5 that will allow me to have CRLF (#13#10) display as a single line feed and not a double line feed.

    Of course only using #13 works, but since my text in the database is already formated using #13#10 I don't want to parse all #13#10 and replace them with #13.

    Thanks,


    Michel W.

    If on the BeforeCutText event I remove ppInsertpointKeepStructure from the ProtectedProp it work properly, but now I have another problem.

    How to I set back the ProtectedProp property to include ppInsertpointKeepStructure after doing a cut to clipboard. There is no AfterCutText event and using the AfterCopyToClipboard event also does not work since that event is called too soon.

    The only way I can find to do this is to use a timer that will get triggered let say 1 second after the BeforeCutText event. This is not really clean code.

    Having an AfterCutText event will make it possible to fix my problem. Also, it will make sense to have After... events for each Before... events so that we can execute our own code.

    Thanks,


    Michel W.

    Cut (CTRL-X) does not work properly with InputEditField when ppInsertpointKeepStructure is set in the ProtectedProp property.

    I have a TWPRichText with the property ProtectedProp = [ppInsertpointKeepStructure]

    If I type some text and I create an InputEditField (WPRichText1.InputEditField('TEST')), and then highlight the text including the InputEditField , if I cut the text with (CTRL-X), the whole text, including the InputEditField, gets copied into to clipboard buffer, but on screen, the InputEditField does NOT get deleted. It is still displayed.

    Is this normal ?

    I think that the InputEditField should get deleted when you highlight it and press CTRL-X.


    Thanks,

    Michel W.

    This does not fix my problem. I want my .RTF file to get displayed properly in WPTools 5 just like it was displayed in WPTools 2.

    To test this yourself, use the WordPad demo from WPTools2 and WPTools5.

    I have already sent you a .zip file containing both .exe files for these WordPad demo for WPTools 2 and 5. I have sent this e-mail to support@wptools.de on March 13, 2008.

    If there is no options or property changes that can make it displayed properly in WPTools5, do you have a small application that will fix the .RTF file and make it displayed properly in WPTools 5 ?


    Thanks,

    Michel W.

    I have sent an e-mail to support@wptools.de on March 13, 2008 and I did not get an answer. So here is more information.

    Here is what the RTF document looks like in WPTools 2.35 using the WordPad demo:

    [Blockierte Grafik: http://img20.imageshack.us/img20/1603/rtfdisplayedinwptools23sb5.jpg]


    Here is the same RTF document displayed in WPTools 5 using the WordPad5 demo (you will notice that there are no horizontal lines between CLINICAL HISTORY, PAST HISTORY, MEDICATIONS, ALLERGIES and REASON FOR REFERRAL):

    [Blockierte Grafik: http://img20.imageshack.us/img20/7929/rtfdisplayedinwptools5xw1.jpg]


    Can you please tell me how I can display the RTF document properly (just like WPTools 2) using WPTools 5, because my client has a many documents that were generated with WPTools 2 and I now want to display these documents properly in WPTools 5.

    Note: You can use the .RTF document from my previous post and save it as .RTF to do your own test.

    Thanks,