Subject Re: attaching a method to MYTOOLBAR
From Gaetano <gaetanodd@hotmail.com>
Date Tue, 1 Sep 2020 20:23:38 +1000
Newsgroups dbase.getting-started


It's a lot easier to design visual components visually, in a form, so if
I cannot include a function that is not tied to a baseclass event, I
guess I just need to remember to add it manually to the cc file :)

On 01/09/2020 19:37, Maurizio S. wrote:
> I have very old approach with 'mytoolbar.cc'
> derived from dBulletin
> never changed it, because is very useful
> maybe there are better solutions, but... once works
> rarely use constructor form and/or menu, as prefer editing by hand
>
> sincerely, I do not understand what are you looking for
>
>
> tks
> Maurizio
>
> Il 31/08/20 23:48, Gaetano ha scritto:
>>
>> Hi there,
>>
>> I need a simple function to reset all the MYTOOLBAR button's enabled
>> property to true.
>>
>> In the tutorial, we design custom controls in a form, then export it
>> to mycontrols.cc. However, I have not found a way to link a standalone
>> function (i.e. a function that is not linked to an event) to the
>> toolbar. If I add the function to the form, nothing links it to the
>> toolbar and it is not included in the "save as custom" export to
>> mycontrols.cc file.
>>
>> I can add it manually to the CC file but every time I make an update
>> to the control in the form and re-export it, the function is lost
>> because I don't know how to attach the function to the toolbar object
>> inside the form.
>>
>> Is there a way around that or do I just need to remember to re-add the
>> function manually in the .cc file inside the toolbar class definition?
>>
>> Thanks,
>> Gaetano.