Thank you very much.
Is this already available for download?
Beiträge von Stef Merlijn
-
-
It would be perfect if you would make that functionality.
Can you please explain how it can be used then, as I don't understand what you mean right now.
Do you mean it will be available in the object inpector? -
Maybe internally, but they do not show in the WPRichEdit.
Only www. is shown, not http://www.Codeif Hyperlinkobj <> nil then begin frm.IHyperlinkTekst.text := Hyperlinkobj.EmbeddedText; frm.IHyperlink.text := Hyperlinkobj.source; end;
IHyperlink.text contains not the HTTP:// part.
-
I need to execute the code within the IFDEF, so a solution would be very welcome, yes.
What do you mean by "make it an option in the format strings"?And why would this code not execute in my D2007 compiler. Does it execute in your environment?
-
Hi Julian,
Yes I've tried that just now, BUT
I still have to adjust a standard unit, where it should be possible to trigger this define from outside this unit, as this file will also be changed in future updates.
I've tried changing WPINc.INC, but even that doesn't work.What can be the reason why it doesn't work?
Can you resolve this? -
Hi,
wpAutoDetectHyperlinks doesn't include the http:// into the link.
It does work correctly with https://, ftp://, mailto: and www.So when typing: http://www.mydomain.com
It creates a link only for http://http://www.mydomain.com -
Hi,
I did try to define them in the Project Options. Didn't work.
I tried to set {define in unit where is is used. Didn't work.
I would rather not like to use WPINC.INC as that file will be changed in future opdates.Can you please test if your suggestion is actually working?
-
Hi,
I did do the following:
Added {$define ADDIMG_CID} to the implementation setting of the main unit.Added the showmessage:
{$IFDEF ADDIMG_CID}
showmessage('ADDIMG_CID');
if Copy(fnam, 1, 4) <> 'cid:' then
fnam := 'cid:' + fnam;
{$ENDIF}The message is not shown.
When I comment out the IFDEF, then this code is correclty executed.Can you please have a look at it.
-
Hi,
In a WPRichEdit I have added some bullets. For this I use action: WPABullets1
This works fine when I add the standard bullet to a document and print it directly.But when using SaveToFile, making sure it is in RTF format, if I reopen the document all bullets are lost when the document is printed.
(ie the formatting of the line stays, but the bullet itself does not show)
Also when I change the format of the bullets to f.e. squares the same happens.Is there some way to correct this?
-
After some testing I found out the following:
For changing the textcolor apparently you need to setup two events in order to get it to work:
Codeprocedure TForm1.mbTextColorChange(Sender: TObject);begin WPTEditor.SelectedTextAttr.SetColor(mbTextColor.Color);end;procedure TForm1.mbTextColorCurChange(Sender: TObject);begin If WPTEditor.Changing then WPTEditor.ChangeApplied;end;
Where f.e. for the textmarker one event will do nicely:
Codeprocedure TForm1.mbMarkerChange(Sender: TObject); begin If WPTEditor.Changing then begin WPTEditor.SelectedTextAttr.SetBGColor(mbMarker.Color); WPTEditor.ChangeApplied; end; end;
At least I got it working now.
-
-
Hi Julian,
Can you give me an example on how to do this in the code I supplied above?
Thanks, Stef
-
Hi,
The OnChange-event of TRichText is not fired when changing fontcolor, but when adding/replacing/moving tekst it is fired correctly.
I use USEDEVEXPRESS.Code
Alles anzeigenprocedure TFDossierDetails.mbTekstkleurChange(Sender: TObject); begin WPTEditor.Changing; WPTEditor.SelectedTextAttr.SetColor(mbTekstkleur.Color); end; procedure TFDossierDetails.WPTEditorChange(Sender: TObject); begin StatusBar.Panels[2].Text := 'Changed'; end; procedure TFDossierDetails.WPTEditorCharacterAttrChange(Sender: TObject; Attribute: TWPSetModeControl); var vStyle: WrtStyle; vFontName : TFontname; vColor, vBGColor : TColor; vTekengrootte : Single; vOnderstreeptModus : Integer; vVet, vCursief, vOnderstrepen, vDoorhalen, vSuperscript, vSubscript : Boolean; begin vStyle := WPTEditor.CurrAttr.Style; vVet := (afsBold in vStyle); vCursief := (afsItalic in vStyle); vOnderstreeptModus := WPTEditor.CurrAttr.UnderlineMode; vOnderstrepen := ((afsUnderline in vStyle) or ((vOnderstreeptModus > 0) and (vOnderstreeptModus < WPUND_NoLine))); vDoorhalen := (afsStrikeout in vStyle); vSuperscript := (afsSuper in vStyle); vSubscript := (afsSub in vStyle); if WPTEditor.IsSelected then begin // Bij geselecteerde tekst kan de tekst uit meerdere soorten Lettertypes, kleuren etc. bestaan // In dat geval if not WPTEditor.SelectedTextAttr.GetFontName(vFontName) then // Font naam bestaat niet of is leeg vFontName := ''; if not WPTEditor.SelectedTextAttr.GetColor(vColor) then // Font kleur bestaat niet of is leeg vColor := 0; if not WPTEditor.SelectedTextAttr.GetBGColor(vBGColor) then // Font achtergrondkleur bestaat niet of is leeg vBGColor := 0; if not WPTEditor.SelectedTextAttr.GetFontSize(vTekengrootte) then // Font achtergrondkleur bestaat niet of is leeg vTekengrootte := 0; end else begin vFontName := WPTEditor.CurrAttr.FontName; vColor := WPTEditor.CurrAttr.Color; vBGColor := WPTEditor.CurrAttr.BKColor; vTekengrootte := Round(WPTEditor.CurrAttr.Size); end; // Kleuren uit editor in kleur comboboxen zetten. mbLettertype.Text := vFontName; mbTekstkleur.Color := vColor; mbMarkeren.Color := vBGColor; mbTekengrootte.Text := IntToStr(Round(vTekengrootte)); mbVet.Down := vVet; mbCursief.Down := vCursief; mbOnderstrepen.Down := vOnderstrepen; mbDoorhalen.Down := vDoorhalen; mbSuperscript.Down := vSuperscript; mbSubscript.Down := vSubscript; end;
What can be a reason why this OnChange-event isn't fired?
-
Hi,
It seems to be a little different.
The customer copies text from MS Word to TRichText. The copied text has font Myriad Pro. This font is available in MS Word, but not in the ComboBox where all fonts are loaded into by:When the copied text in TRichText is selected the correct font is however shown in the combobox, but even then It's still not available in the dropdown.
When the user selects some other text in TRichText (f.e. Arial). The text can even be changed into "Myriad Pro", by typing the fontname into the combobox and pressing enter.
So what could cause a font to be available in MS Word but not in Screen.Fonts? Does MS Word look at another place?
-
Hi,
I use the code below to populate the installed fonts into a combobox.
One of my customers installed a new font "Myriad pro" (on Windows 7), but this font doesn't always become available in the combobox of my application.The TWPRichText contains some mergefields, that were placed inside the component at designtime.
When a user selects these mergefields, the new font isn't available. When he selects any other part of the text in the TWPRichText, the font is shown.Is there any way to solve this?
-
Hi,
In MS Word one can set the way an image is placed in the document, like: In Text, Behind the text, in front of the text, text above and below etc.
Is there a way to do this in WPTool TWPRichText?
Is there a build-in menu available for image-manipulation (like the one for tables)? -
Thank you, that helped me in the right direction.
-
And... what would be the correct event to do this?
-
But how do I get the color under the current cursor position?
-
Hi,
I'm using USEEXPRESSBARS
Textcolor to textbackgroundcolor in the editor are changed by following procedures.Codeprocedure TForm1.mbBGColorChange(Sender: TObject);begin WPRichText.Changing; WPRichText.SelectedTextAttr.SetBGColor(mbBGColor.Color);end;procedure TForm1.mbTextColorChange(Sender: TObject);begin WPRichText.Changing; WPRichText.SelectedTextAttr.SetColor(mbTextColor.Color);end;
When scrolling through the text, I want mbBGColor and mbTextColor to reflect the current color under the cursor.
I thought of using OnChangeCursorPos event, but don't know how to get the color under the cursor and set it to the controls. Like:
Codeprocedure TForm1.WPRichText1ChangeCursorPos(Sender: TObject); begin mbTextColor.Color := WPRichText1.SelectedTextAttr.GetColor.....??? mbBGColor.Color := WPRichText1.SelectedTextAttr.GetColor.....??? end;
Can you give me some samplecode on how to set this up?