trichview.support
Re: TDBRichViewEdit in the DLL |
Author |
Message |
William Zhu |
Posted: 09/06/2004 4:44:01 Yes, you are right. I solved it yesteday such as yours, I added some code in the FormCreate: procedure TMyForm.FormCreate(Sender: TObject); var i: Integer; begin with MyActionList do for I := 0 to ActionCount - 1 do if Actions[I] is TrvAction then Actions.OnExcute := MyActionExcute; end; The procedure 'MyActionExcute' is same as yours. Now, All Ok! Thank you for your eagerness. :) william ----- Original Message ----- From: "Sergey Tkachenko" <[email protected]> Newsgroups: trichview.support Sent: Saturday, September 04, 2004 11:05 PM Subject: Re: TDBRichViewEdit in the DLL > Well.... > State of actions (enabled, visible, checked, etc.) is updated periodically > when the application is idle. > In the same event actions are linked with the editor control. > > It looks like DLLs do not have this actions update cycle, so actions in > DLL do not work. > > You can try to simulate this cycle. > > Add a timer to your form: > > procedure TMyForm.Timer1Timer(Sender: TObject); > var i: Integer; > begin > for i := 0 to ComponentCount-1 do > if Components[i] is TrvAction then > TrvAction(Components[i]).UpdateTarget(RichViewEdit1); > end; > > and assign to OnExecute of all RichViewActions on this form: > > procedure TMyForm.rvActionExecute(Sender: TObject); > begin > (Sender as TAction).ExecuteTarget(RichViewEdit1); > end; > > > > > > Is the complete from from dll, including TRichViewEdit and all actions? > > > > Yes, the form which includes TRIchViewEdit and all actions is built in > DLL. > > All feature is ok when I built a new EXE project which includes this form, > > but it does not work when I bring this form through a DLL which includes > > this form. > > Hope you understand me, sorry for my bad english :), aspire after your > help. > > > > > > > > > > > Or may be actions are defined in dll but TDBRichViewEdit is from exe (or > > > vice versa)? > > > > > > > > > > I used a TDBRichViewEdit (1.7.11) in a form which is included in a > DLL, > > > the > > > > problem is the most of actions of this rve do not work (for example, > > > > clipboard's cut, copy etc.) when I perform this form through DLL's > > > > exporting. > > > > But it all is normal when I run it in a EXE project directly! > > > > > > > > What's matter???? help me please. > > > > > > > > Thanks > > > > > > > > william zhu > > > > > > > > > > > > > > > > > > > > > |
Powered by ABC Amber Outlook Express Converter