I think the ImageColumn does not recognize the blob data because is generic and typeless.
I recommend to add event handler to the dataset to load the image object in code, OnScroll would be a good place.
I think the ImageColumn does not recognize the blob data because is generic and typeless.
I recommend to add event handler to the dataset to load the image object in code, OnScroll would be a good place.
Please use an ANSI string, and the function AnsANSIString('HTML')
If you work with e-mail you can use SaveToStream and LoadFromStream.
Please check the data you saved and load in an text viewer. For russian text it should be UTF8 encoded.
For PNG export with transparency you need wPDF 4.
Please also add {$DEFINE WPDF4} to the file WPINC.INC or WPDF4 to the project conditionals and do a BuildAll.
I just tried with the word processor demo - it works fine.
Try to disable GDIPP in Wpobj_image.pas
The width of the text cursor changes to full character width if in overwrite mode, otherwise it uses the width assigned to the global variable WPMINCursorWidth which defaults to 1.
The blinking is controlled by WPRichText.Caret.blink
Die Auflösung des Canvas ändert sich nicht zwangsläufig trotz der Übergabe an StartWatermark, je nach CanvasReferenz.
Ich empfehle die Graphic aber hiermit einzubetten
function DrawGraphicFile(x, y, w, h: Integer; const FileName: string): Integer;
Hier könnte man aber auch auf die Wasserzeichenfunktion verzichten, da der Rückgabe wert der Funktion auch in mehrfachen Aufrufen von
function DrawBitmapClone(x, y, w, h: Integer; LastBitmapID: Integer): Integer;
verwenden kann, ohne dass dabei Daten dupliziert werden.
1) This is a standard TGrid and uses TColumn. I may be mistaken, but I see no way to configure the header in the TColumn.
2) Yes, this function would be nice to have but I did not have time to implement it.
Instead of
WPPDFRichText1 := TWPRichText.Create( Self )
I recommend to use
rtfengine := TWPCustomRTFEdit.CreateDynamic;
Using CreateDynamic no window handle is required and TWPCustomRTFEdit can work without having a parent form.
You need to call ReformatAll if you print or export to PDF right after the loading of the file.
Please also check if you have the wPDF license installed, call wpdf_start() with the parameters provided to you in delivery e-mail.
Thanks for the example project, please see my e-mail for solution.
WPTools works in a DLL - I use it in TextDynamic and RTF2PDF product for years.
But it is questionable if the kind of use is actually allowed.
You may use WPTools only in a DLL if all developers who reference this DLL also have a WPTools license.
You may send me your question by privat mail.
ZitatOne last thing for future consideration in your dialogs...
As I've mention in the past, it would be nice if you allow the programmer to decide where the dialog should show up. Currently it always shows up in the top left corner, which is not nice on a 4K 40" monitor when my app is a relatively small form in the middle of the monitor. Like the old baseball reference "out in left field" in the literal sense. ;)
There are a few dialogs which are non-modal. They are supposed to stay at their last position. This is why they don't use auto - screen center.
You can easily modify their position (and other things) before they are showed by using the event OnShowDialog:
ZitatWhat is happening is that it works up until it finds a match, i.e. loops loading each WPRichText out of the database just fine. Once it finds a WPRichText with a match, it highlights it, but clicking on find next just displays its own "text not found" msg even if there are more matches in the current WPRichText and does not invoke the OnSearchReplaceMessage event in order for me to move on to the next WPRichText.
I assume the focus changes during loading and the OnSearchReplaceMessage is checked for a different TWPRichText (which does not have one). So this is very specific to your program. Using breakpoints it is usually quick to find the problem. You should assign the SearchReplaceMessage() to all instances.
I don't think it has to do with WPTools V5 vs V9 - there is an event interfering if the find dialog looses focus.
The active WPRichText is provided by the global function
function ActiveRTFEdit(p: TWPCustomRtfEdit): TWPCustomRtfEdit;
which checks the global variable WPLastActiveRTFEdit if p is nil.
WPLastActiveRTFEdit is set procedure TWPCustomRtfEdit.GetFocus;
So if I would have a focus problem in a project I would place a break point in procedure TWPCustomRtfEdit.GetFocus and check when it is called while the search goes on.
I don't understand why you not build your own Search and Replace dialog which works for your project as you need. My dialogs are more for a Word style program, not for one which works on multiple records.
Use WPRichText.OpenDialog( wpdiaFind, '@SELECTED@' )
or
Use WPRichText.OpenDialog( wpdiaReplace, '@SELECTED@')
to start the search and replace dialog with the selected text if you do not use the standard actions.
The WPTools dialogs use functions FindTextMethod and ReplaceTextMethod which can be also called by custom made search&replace dialogs for more control.
ZitatI did use Finder in WPT5 and it worked well. For WPT9 I even tried setting focus in code on the newly loaded WPRichText, but had the issue I mentioned in my previous post where I had to manually focus the WPRichText to get it to find next.
I don't understand. If you use the Finder the focus does not matter at all. It works on the TWPRichText which is the parent of the Finder object.
WPTools 9.1 includes a new find dialog which also supports style replacement and can assign attributes.
WPTools 5, which was last serviced on 14.12.2010 used the old standard dialogs.
But the old handling is still there, see $DEFINE STANDARD_FINDDIALOG in WPCtrRich.pas and will be used if you do not use the new component on your form.
For custom find operation as outlined above you need to use the "Finder", i.e. you want to loop through multiple database records. The standard dialog cannot do that for you since database navigation is required.
It has a next function which locates text.
If you replace text in a TDBWPRichText make sure to call Changing before you do so, because the database must be in edit mode.
The not modal dialogs are ment to work with the active TWPRichText - that's the last editor which receives the focus by mouse click or a call to SetFocus.
a) linked images are blocked because of data protection considerations. It is possible to click the link though.
b) the code I suggested to modified was the following. I introduced wpUseAttributeEvenIfSingleParagraph for future versions.
if wpUseAttributeEvenIfSingleParagraph in Options then
LoadFromStream(mem, 'WPTOOLS', TRUE)
else LoadFromStream(mem, 'WPTOOLS-overwriteparattr', TRUE);
c) You can use
LoadFromString( src.AsANSIString('WPTOOLS'), 'WPTOOLS,-nodefaultfont', false )
instead of SelectionAsString to avoid conversion to unicode strings.