Page 1 of 1

Disable action when open new TForm

Posted: Tue Jun 25, 2013 9:53 am
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

Posted: Tue Jun 25, 2013 3:04 pm
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?

Posted: Wed Jun 26, 2013 6:35 am
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

Posted: Thu Jun 27, 2013 10:19 am
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;