Does trichview support creation of forms?
-
- Posts: 9
- Joined: Wed Sep 21, 2005 12:17 pm
Does trichview support creation of forms?
Similar to pdf forms or html forms?
I know of the support for OLE editors, but miss something simpler to use if end users should modify their forms.
Best regards
Ove
I know of the support for OLE editors, but miss something simpler to use if end users should modify their forms.
Best regards
Ove
-
- Site Admin
- Posts: 17534
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 9
- Joined: Wed Sep 21, 2005 12:17 pm
Hmm, I don't think you understand what I'm looking for.
I'm trying to create something like:
https://skjema.dokumentsikkerhet.no/dok ... BlkID=3661
Is it possible to this with trichview? Do you have any examples similar to this?
Best regards
Ove
I'm trying to create something like:
https://skjema.dokumentsikkerhet.no/dok ... BlkID=3661
Is it possible to this with trichview? Do you have any examples similar to this?
Best regards
Ove
-
- Site Admin
- Posts: 17534
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17534
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Code: Select all
var edit: TEdit;
edit := TEdit.Create(nil);
edit.Width := 100;
RichViewEdit1.InsertControl('', edit, rvvaBaseline);
If you insert a TCheckbox, set its ParentColor = False.
In order to load controls from files of RVF format (this includes copy-pasting and drag&drop) you need to register their classes - one time before the first loading, for example in the initialization section of unit:
Code: Select all
RegisterClass(TEdit).
Example of this event can be found in Demos\Delphi\Editors\Editor 1\.
Yes, RichViewEdits can be inserted too, but you need to solve the problem with RVStyle somehow (it cannot be inserted in TRichView, because it is not a visual control). For example, you can create and destroy them using OnControlAction event. Important note: the initial property settings of TRichViewEdit placed on the form at designtime can be different from the initial settings of TRichViewEdits created from code. It is because at designtime they are overriden by the component editor settings (right click, choose "Settings" in the popup menu). At run time, the initial propety settings are set neither in "allow adding styles dynamically" nor in "use a predefined set of styles" mode. The required changes in property values for both modes are shown in this designtime component editor window.
One more issue - drag&drop of inserted components. Unlike all other content, they cannot be dragged automatically (only as a part of larger selection), some code is required for this. I'll post an example in the "Examples, Demos" group today.
-
- Posts: 9
- Joined: Wed Sep 21, 2005 12:17 pm
Yes, I know, but what I'm looking for is that everything is readonly except for the input fields, and that the user can tab between the input fields(I'd rather not use delphi components, but change readonly property of paragraphs)Sergey Tkachenko wrote:This page contains a number of edit fields (<input type=text>) and bordered areas (<div>), all of them positioned absolutely.
The same effect can be achieved in TRichView using TEdit and tables.
Sorry for the delay in the tread:-)
Best regards
Ove Halseth
-
- Site Admin
- Posts: 17534
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 9
- Joined: Wed Sep 21, 2005 12:17 pm
We do not want to use edit controls because, the schema template will be editable to the end user. So we want to keep it simple. The user will use predefined formats on the text in his template(wich behind the scene is tied to readonly/editable) and he will also be able to put merge fields in the schema.
We are almost there with rv/re and schemas, the one thing we miss now is being able to tab between the editable fields. The problem is that it is no way to cancel a KeyDown event. We check for tab in the KeyDown event and want to set focus to the next editable field, and set Key := 0;
But the editor get hold of the TAB keypress any way. We also tried to catch TAB at Form level, but it seems like re does not obey KeyPreview:-(
Any hints?
Best regards
Ove Halseth
We are almost there with rv/re and schemas, the one thing we miss now is being able to tab between the editable fields. The problem is that it is no way to cancel a KeyDown event. We check for tab in the KeyDown event and want to set focus to the next editable field, and set Key := 0;
But the editor get hold of the TAB keypress any way. We also tried to catch TAB at Form level, but it seems like re does not obey KeyPreview:-(
Any hints?
Best regards
Ove Halseth
-
- Site Admin
- Posts: 17534
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: