My application uses TOLEContainer. If i embed a Word document in the OLE container and in the word document i put some equations, these equations doesn't paint properly within the application. If i open the OLE object is Word, the equation is displayed correctly.
What could be the reason? What can i do to fix this?
if You are not use olecontaner.CreateObjectFromFile please try this method instead of CreateObjectFromInfo
Best regrads,
Irq Mishell
Related
I (still) use Delphi 7, with Report Builder (Digital Metaphors). I have a DbRichText, I would like to write just the first word in bold. It would be better to use onCalc on the run-time editor instead of coding in Delphi, but I'll acept any kind of solutions and suggestion. Thanks
I found this solution:
1) I create a memo field in database where I put an rtf text.
Example: '{\rtf1\ansi \b first\b0 word \par second line}'
2) OnCalc function of report builder of a RichView object, I do:
obj.RichView := TableName['rftField'];
I'm working in a Delphi IDE expert and I wonder if it's possible add new items to the code completion combobox displayed by the Delphi IDE when the user press CtrlSpace
UPDATE:
What I need is add items to the code completion list based in a specified type.
example suppose which I have a type called TMytype, what I want to do is add addional items to the code completion list when the user type a variable of the type TMytype
check this image
I found your question somewhat confusing but if you are in search of credible source on "Custom Live Templates" and the like on Delphi, head to the blog of Cary Jensen here.
Edit:
Looking forward to further improvement of the scope of the question, I suggest here another direction to explore:
Source code manipulation using IOTAEditor, IOTASourceEditor, IOTAEditReader and the like
Some Parsing for sanity check prior to apply any modification.
Adoption of Client DataSet as a format to store data (It's serializable) to simplify the coding of IDE editors.
Perhaps I haven't fully grasped the extent of what you are asking here, but you can add templates simply by going to 'View|Templates' from the Delphi IDE. This then opens a template viewer. Press the '+' icon. It opens a template1.xml document which you can then edit so create your new item.
If you wish to do this programatically, just add an xml file (of the same format) to the ..\RAD Studio\code_templates folder.
I have a couple of (mostly) text widgets that I would like to render to a printer through a standard "Print..." menu option. One widget is a Mono.TextEditor document, and the other is a Gtk.TextView.
I'm looking for a pretty basic print for now, which might wrap long lines, and add page numbers. Do I need to code all of this myself somehow?
If you have pointers, that would be great, especially if they were in C#.
For line wrap and justification, one can use pango Layout
options, as described for Python at pygtk/class-pangolayout or for C at pango/pango-Layout-Objects. See functions pango_layout_set_wrap() and pango_layout_set_justify().
Also see the example-code routines begin_print, do_page_setup, and do_print in file pygtk-demo/demos/print_editor.py, if you have installed pygtk on your system. (On my system, the full path to directory of Python Gtk demo files currently is /usr/share/doc/pygtk2-2.17.0/examples/pygtk-demo/demos)
For printer setup dialog, see gtk-High-level-Printing-API for C, or class-gtkprintoperation for Python.
I have an old app (Delphi 5) which I want to give it some changes via Res Editor !
I want to set a background image for a Form via RCData in Res Editor, How can I do that?
Any help is really appreciated.
Thanks :)
Delphi forms don't have a simple background-image property.
You could edit the DFM resource for the form to insert a TImage control. Extract the DFM resource, open it in Delphi, add the control you want, save it, and then replace the original resource with your new version.
See also:
Setting up background images for forms in Delphi
How to add background images to Delphi forms
Angus Johnson has written a utility called ResHacker. Use it to directly edit the form properties in the exe file.
This is the link to his site
Majid Pasha, procedure is really simple and straight-forward:
Extract form resource (type is RCDATA, name matches form in question, language is not important)
Convert form from binary format to text using convert utility (shipped with delphi)
Use your Delphi to design boilerplate image, load picture, set placement, etc
View designed form as text, copy you new image definition along with all its data
Paste image into text version of extracted form resource
convert back to binary format
Add resource back to executable replacing original one.
Note: depending on tools uses, there might be some shortcuts to bypass conversions and extraction, eg: XN Resource Editor is able to edit Text DFM directly.
We print database records in rave using rvproject1 and rvdatasetconnection1 and that works.
How to acomplish this in rave:
If Adotabel1.fieldbyname('something').asstring = 'something' then
Rectangle1 on a data band.color=black
else
Rectangle1 on a data band.color=green
Rawn,
I believe you must download the Visual Designer Guide.pdf located here
http://www.nevrona.com/Rave/downloadbe.html. What you want to accomplish can be done in several ways(with editor events, from Delphi code, etc). In the manual you will find exactly how to code the band or datatext onbeforeprint event(Rave Report 'language' is very similar to Delphi). At this moment I don't have the time for making you an example.
best regards,
Radu