problem with action script when I have more than 1 DBSRich..

General TRichView support forum. Please post your questions here
Post Reply
alexandreq
Posts: 184
Joined: Wed Jan 18, 2012 6:22 pm

problem with action script when I have more than 1 DBSRich..

Post by alexandreq »

Hello Sergey,

I have a form with 3 DBSRichViewEdits and when I use this actions:

srvActionOrientationPortrait1,
srvActionOrientationLandscape1,
srvActionEditHeader1,
srvActionEditFooter1

the actions don't execute the correct option on the correct selected (focused) component.

For example

If the focus is on DBSRichViewEdit1, the actions gets another DBSRichViewEdit, it doesn't apply the change in the DBSRichViewEdit correct.

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

Post by Sergey Tkachenko »

Please send a sample project to reproduce to richviewgmailcom
alexandreq
Posts: 184
Joined: Wed Jan 18, 2012 6:22 pm

Post by alexandreq »

Hello Sergey,

I was preparing an example to send to you then I noticed something very interesting.

Let me explain.

In my project I use the suipack component for skin from http://www.sunisoft.com, I noticed when I have my DBSrichViewEdit on Suipagecontrol, it gets crazy the action script.

If I Use pagecontrol from Delphi, it works fine.

Why? I am sending to you an executable file so that you take a look at it.

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

Post by Sergey Tkachenko »

I did not receive the email, but I can suggest a solution.
When a TSRichViewEdit gets the input focus (OnEnter event), assign:

Code: Select all

RVAControlPanel1.DefaultControl := FocusedSRichViewEdit.RichViewEdit;
srvActionOrientationPortrait1.Control := FocusedSRichViewEdit;
srvActionOrientationLandscape1 := FocusedSRichViewEdit;
...
alexandreq
Posts: 184
Joined: Wed Jan 18, 2012 6:22 pm

Post by alexandreq »

thanks sergey.

I did what you asked me to do and works.

What does this component do RVAControlPanel1? Must I have it in any project?
Sergey Tkachenko
Site Admin
Posts: 17572
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

TRVAControlPanel allows changing some settings.
See http://www.trichview.com/help-actions/t ... lpanel.htm
Actually, assigning to its properties changes values of some global variables, so it does not make sense to have more than one TRVAControlPanel in a project.
This component is not necessary if you do not want to change settings.
Post Reply