Implementing Infopath like forms with TRichViewEdit

General TRichView support forum. Please post your questions here
Post Reply
WhiteBird
Posts: 4
Joined: Tue Jun 06, 2006 6:25 pm

Implementing Infopath like forms with TRichViewEdit

Post by WhiteBird »

Our application requires support of form-like documents like Infopath forms.

The interface part of it can be possibly based on TRichViewEdit component.

On the face of it TRichViewEdit has all functionality to implement many cool features of Infopath for example including fields of different data types in text documents, providing custom editors for each data type, building document layout with tables. Even implementing of Infopath repeating sections seems possible.

But i have study TRichView capabilities not so deep. Maybe there is a problem that will make coding this engine almost impossible or very hard.

Need your advice.

Vulfovich Philip
Sergey Tkachenko
Site Admin
Posts: 17310
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

This is too general question, if you have a specific problem, I'll try to help.
WhiteBird
Posts: 4
Joined: Tue Jun 06, 2006 6:25 pm

Post by WhiteBird »

O.k. I have several more specific questions.

1) I need control multiselect (drag and resize several controls simultaneously) option in TRichViewEdit. How difficult it would be to implement this?

2) Is it possible to draw vector objects above text and controls? Like borders or connecting lines or something else?

3) In Infopath when mouse cursor inside control area some (hint) buttons appears. I think this is like hint windows. How to implement custom hint windows in TRichViewEdit?
Sergey Tkachenko
Site Admin
Posts: 17310
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

1) TRichView implements drag and drop of the document selection. If several controls are in the selected fragment of document, user can drag them. But all of them must be in continuous fragment of document.

2) You can use OnPaint event to draw above the text, but you cannot draw above inserted windowed controls, they have their own windows and canvases.

3) In v1.9.9, "smartpopups" were implemented.
Since the current trial version is 1.9.8 (except for Delphi 2006 trial, which is newer), below is info about this feature:
It's a small button appearing in the corner of the current item.
Only one such button can be displayed at the same time.
new: property TRichViewEdit.SmartPopupProperties, contains subproperties:
- Color, HoverColor, LineColor, HoverLineColor, ImageList, ImageIndex -
define visual appearance of smartpopup button;
- Hint - hint of smartpopup button;
- ButtonType (DropDown (triangle)/ShowDialog (3 dots)/Simple) - defines
how the popup button looks like in hot state
- ShortCut (default Shift+Ctrl+Down) - allows using keyboard instead of mouse
- Menu - popup menu to display on click (or on ShortCut)
new: property SmartPopupVisible - shows/hides the popup button for the current
(at the position of caret) item. Editor hides this button automatically
on document change or clearing. Since smart popup works only for
the current item, you must ensure that it is displayed for the current item -
update it in OnCaretMove event. Even if this property is True, reassigning
True to it makes sense, because it links the smart popup to the current item.
new: event OnSmartPopupClick - allows implementing your own effect when clicking
the smartpopup button (or on pressing ShortCut). If you use menu, it's not
necessary to process this event.
new TRichViewEdit.SmartPopupProperties.SetButtonState(Hot: Boolean);
Call SetButtonState(True) to fix the button in the "hot" state. It's useful
to do this when you display your own dropdown window for the button.
Call SetButtonState(False) to return it back to normal.
Post Reply