Page 1 of 1

Multiple forms with richviewactions

Posted: Sun Jun 24, 2007 8:30 pm
by remixtech
Hello,

I have a problem with my multiple forms application...
I have three forms open and when i click on bold on one application ? All application button bold are pressed ...

Is it possible to press only the button of the activate form ?

THanks a lot
bye

Posted: Mon Jun 25, 2007 6:49 am
by Sergey Tkachenko
Assign RichViewEdit to Control property of all richviewactions on the same form.

Posted: Mon Jun 25, 2007 10:01 am
by remixtech
I have only one richviewaction on the principal form ..
The problem is visual, when i click on the bold button on one form, all other "bold" buttons are pressed on the other forms...

Thanks for your answer

PS : Ihave probably dont understand your answer could you repeat ?

Posted: Mon Jun 25, 2007 10:09 am
by Sergey Tkachenko
If you have only one copy of some action linked to several buttons, all these buttons will reflect changes in this action. I.e. all these buttons will be checked and disabled simultaneously.

Posted: Mon Jun 25, 2007 10:19 am
by remixtech
There is no solution possible ? I could allocate only action on the activated form?
Thanks

Posted: Mon Jun 25, 2007 12:08 pm
by Sergey Tkachenko
Yes, you need to create copies of actions on each form.
Or you can reconsider your application's GUI. The most of modern applications use only one copy of toolbar for multiple forms (using tabs or MDI)

Posted: Mon Jun 25, 2007 12:43 pm
by remixtech
thanks

Posted: Mon Mar 10, 2014 9:31 pm
by zanozi
I have the same problem,

Code: Select all

Yes, you need to create copies of actions on each form. 
Can you write an example for Bold action ?

Posted: Tue Mar 11, 2014 8:37 pm
by Sergey Tkachenko
I can explain how to implement multiple forms with actions, if you have problems implementing it, I can make an example.

1. Each form must have TRichViewEdit, TActionList containing actions, toolbar linked with these actions.
2. Assign this RichViewEdit to Control property of all actions on this form.
3. The following components may be common for all these forms: TImageList containing images for tool buttons; TRVAControlPanel; they can be placed on a datamodule that must be created before editing forms.