Subject Re: attaching a method to MYTOOLBAR
From Andy Taylor <andy.taylor.1959@outlook.com>
Date Tue, 01 Sep 2020 19:23:26 -0400
Newsgroups dbase.getting-started

Gaetano,

I don't think that's true.
The problem here is that it's hard to visualise what you want without some sample code.
Stripped down as much as you like... then we have something to work with.
It's easy for you to understand what you want... you can see your code and understand your problem... we have to guess.

Regards,
Andy


> 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.
>