PDA

View Full Version : نمایش فایلهای RTF حاوی تصویر در RichEdit



Kambiz
جمعه 19 دی 1382, 12:51 عصر
RichEdit فایلهای RTF ای رو که Object داخلشون درج شده باشه کامل نشون نمی‌ده. به عبارتی Object ها رو ندید می‌گیره.

به عنوان مثال در فایل نمونه (http://delphiarea.com/external/TEAMWORK.rtf)، در بین متن یک تصویر Metafile درج شده است. WordPad فایل رو بصورت صحیح نمایش می‌ده و همچنین چاپ می‌کنه اما تو کنترل RichEdit انگار نه انگار که تصویری وجود داره.

چه راه حلی برای برطرف کردن این مشکل وجود داره؟

مهدی کرامتی
شنبه 20 دی 1382, 00:46 صبح
من از RxRichEdit (متعلق به مجموعه RxTools) بجای TRichEdit استفاده کردم، مشکلی نداشت.

اگر نداریش بگو برات Upload کنم.

ارادتمند،
کرامتی.

Kambiz
شنبه 20 دی 1382, 01:24 صبح
ممنون! :)

Inprise
شنبه 20 دی 1382, 17:02 عصر
RichEdit فایلهای RTF ای رو که Object داخلشون درج شده باشه کامل نشون نمی‌ده. به عبارتی Object ها رو ندید می‌گیره.

به عنوان مثال در فایل نمونه (http://delphiarea.com/external/TEAMWORK.rtf)، در بین متن یک تصویر Metafile درج شده است. WordPad فایل رو بصورت صحیح نمایش می‌ده و همچنین چاپ می‌کنه اما تو کنترل RichEdit انگار نه انگار که تصویری وجود داره.

چه راه حلی برای برطرف کردن این مشکل وجود داره؟

برادر خجسته ،

VCL تمام قابلیتهای Rich Edit ویندوز رو محصور ( Wrap ) نکرده ، فلذا برخی قابلیتها مثل برخی ویژگی های پیشرفته متن و پاراگراف و نمایش تصویر در دسترس نیست ( فکر میکنم علتش اینه که دوستان مومن و متعهدمون در بورلند بجای بازنویسی VCL صرفا" به افزایش کمی اجزاء VCL فکر کرده اند :roll: ) ، نتیجتا" یا باید خودت یک محصور کنندهء جدید برای Rich Edit بنویسی ، یا از رابط OLE اون استفاده کنی .

یکی از برادران مخلصمون بنام "روبرت" نمیدونم چی چی "دان" لطف کرده اند و قبلا" یک کنترل Rich Edit نوشته اند که تمام قابلیتهای Rich Edit 3 رو محصور کرده که در کنار کامپوننتی که برادر کرامتی معرفی کرد ، میتونی نگاهی بهش بندازی : http://home.att.net/~robertdunn/TaeRichEditInfo.html

نکته مهم (!) اینجاست که این کامپوننت با ++C نوشته شده و برای استفاده در دلفی باید یک کلک اکتیو ایکسی سوار کنی ! :P

قابلیتها :

<span dir=ltr>

Completely replaces the Delphi Pascal TRichEdit class and is entirely BCB C++ source (except for a bit of well-commented assembler).

Supports Rich Edit versions 2.0 and 3.0. New classes are included to support Rich Edit 2.0/3.0 font characteristics and paragraph formatting as well as automatic URL recognition, multi-level undo and redo capabilities, and a host of other new features.

Provides OLE support by default. This means that users can paste bitmaps and other objects directly into the control, view and print the bitmaps and objects as they should be displayed or printed, and edit the objects using the program that created them.

Makes previewing and printing the contents of the control easy using default print, preview, print abort dialogs and windows. If you need to change them, the dialogs and windows are easily changed (hey, the source code is included). But you should not really need to modify the source code since events are provided to trap before-page, after-page, before-print-job, and after-print-job control. Using these events, you should be able to modify the rendered output easily.

Includes page headers and footers with substitutable values. That is, you can easily specify headers and footers that print the current page number, the number of pages in the document, the document file creation and/or modification dates, the document file size, the document file name, etc. New properties are included to make setting the values a cinch.

Provides properties for setting margins and drawing borders around headers, footers, and body text. You can specify which borders are drawn (left, top, right, bottom) for each of the sections (header, footer, and body) and the width of the margins and lines.

Includes support classes to simplify saving/retrieving information to/from the Registry and to simplify getting file information (the creation date, long file name, short file name, etc.). There are even functions to test whether a file is probably simple text, RTF, or binary so that you can open the file in the best format.

Includes a Page Setup Dialog component to allow users to set page margins and orientation.



</span>

خوش باشید

Kambiz
شنبه 20 دی 1382, 20:57 عصر
بازم ممنون! :)

Babak Sateli
یک شنبه 05 بهمن 1382, 05:29 صبح
http://www.trichview.com/shots/richviewsml.gif

http://www.trichview.com


RichView is a suite of native Delphi/C++Builder components for displaying, editing and printing hypertext documents. Components support various character attributes (fonts, subscripts/superscripts, colored text background, custom drawn).


:D

Gladiator
یک شنبه 05 بهمن 1382, 09:25 صبح
TrichView عالیه !

DataMaster
چهارشنبه 08 بهمن 1382, 08:21 صبح
سلام
من هر دو تا کامپوننتی رو که معرفی کرده بودید دارم اما مشکل من اینکه وقتی یه عکس رو از داخل تیبل لود می کنم به صورت آیکون نشون می دن.
به طور کلی من می خوام یه متن که حاوی شکل هم هست رو توی تیبل ذخیره کنم باید از چه نوع فیلدی استفاده کنم در ضمن اون کامپوننتها رو چطوری تنظیم کنم

Delphi-Clinic
چهارشنبه 08 بهمن 1382, 16:31 عصر
چاکر حاج کامبیز :wink:

WPTools رو هم نگاه کن.

WWW.WPTools.de

اگه نداریش امر کن تقدیم کنیم.

Inprise
چهارشنبه 08 بهمن 1382, 16:38 عصر
به طور کلی من می خوام یه متن که حاوی شکل هم هست رو توی تیبل ذخیره کنم باید از چه نوع فیلدی استفاده کنم در ضمن اون کامپوننتها رو چطوری تنظیم کنم

حقیر توصیه میکنم از فیلد Blob استفاده کنی . برای تبادل صحیح داده با این نوع فیلدها ، بسته به نوع فراهم کننده ء داده باید از یکی از فرزندان TBlobStream استفاده کنی .

خوش باشی