Hi Sergey,
OnShowingDialog seems to work OK.
However, in my code to do what I'm after, I need to know when the dialog created by TrvActionParaBorder returns mrOK or mrCancel. I can not find a way to get that information.
Do you have any ideas on how to do that?
Thanks Sergey
Stan
TrvActionParaBorder
Re: TrvActionParaBorder
Hi Sergey,
I came up with a workaround.
In my menu item onclick, I store the current state of my rve modified, then set the rve modified to false, then show the dialog using the OnShowingDialog event of TrvActionParaBorder to preset my colors. If the dialog OK button is clicked, then the rve modified goes true and I run some additional code and keep the color and border settings from the dialog. If the dialog is cancelled, the rve modified remains false and I don't run additional code, and then I set the modified state back to the previously stored state. Hacky, but it works.
Stan
I came up with a workaround.
In my menu item onclick, I store the current state of my rve modified, then set the rve modified to false, then show the dialog using the OnShowingDialog event of TrvActionParaBorder to preset my colors. If the dialog OK button is clicked, then the rve modified goes true and I run some additional code and keep the color and border settings from the dialog. If the dialog is cancelled, the rve modified remains false and I don't run additional code, and then I set the modified state back to the previously stored state. Hacky, but it works.
Stan
-
- Site Admin
- Posts: 17554
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: TrvActionParaBorder
Yes, this solution is ok.
Alternatively, you can check for OnChange event call.
Alternatively, you can check for OnChange event call.
Re: TrvActionParaBorder
Hi Sergey,
I created a private boolean var and set that to true in rve.OnChange. In my menu item OnClick I set that var to false and then call the para border dialog. If the var is still false after that, I exit. If it's true I run my code. So yes, that works as well plus it's simpler code and I'm not messing with my rve's modified property.
Thanks for the idea!
Stan
I created a private boolean var and set that to true in rve.OnChange. In my menu item OnClick I set that var to false and then call the para border dialog. If the var is still false after that, I exit. If it's true I run my code. So yes, that works as well plus it's simpler code and I'm not messing with my rve's modified property.
Thanks for the idea!
Stan