Disable action when open new TForm

General TRichView support forum. Please post your questions here
Post Reply
retwas
Posts: 39
Joined: Tue May 21, 2013 1:41 pm

Disable action when open new TForm

Post by retwas »

Hi,

I use all your actions, but when I click on button who open a new form all action are disable :(

Image


How can I fixe it and keep it enable ?

Thanks
Sergey Tkachenko
Site Admin
Posts: 17565
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Sorry, not enough information to answer why it happens.

What version of TRichView?
Do you use TRVAControlPanel component?
Do you use ActionsEnabled property of RVAControlPanel?
Do you use DefaultControl property of RVAControlPanel?
Do you place RVAControlPanel on each form?
retwas
Posts: 39
Joined: Tue May 21, 2013 1:41 pm

Post by retwas »

I use version 13.4of TRichView

I use TAdvToolBarPager > TAdvPage > TAdvToobar > (some) TAdvGlowButton linked to ActionManager and RVAControlPanel

On RVAControlPanel:
ActionsEbanled = True
DefaultControl = my RichViewEdit
Sergey Tkachenko
Site Admin
Posts: 17565
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

I suggest the following
1) Use a single RVAControlPanel in your application. You can place it on a datamodule created before any forms.
In 13.4, RVAControlPanel properties simply changes values of global variables. So having several control panels may cause unexpected results.
2) Do not use RVAControlPanel.DefaultControl. Otherwise, all actions on all forms will work with the specified editor.
Instead, assign Control property of actions:

Code: Select all

  for I := 0 to ActionManager1.ActionCount-1 do
    if ActionManager1.Actions[I] is TrvAction then
      TrvAction(ActionManager1.Actions[I]).Control := MyRichViewEdit;
Post Reply