Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-04

TNoteBook

6 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

Hi,

I have used TNotebook in a (commercial) project of mine. All worked well, till recently.

Now, I get an error "OnPageChange" property not found when loading the control in the DFM.

Since this is the only useful event for this control, why on earth was it removed ?

The only thing the user can do with this control, is switch tabs. If you remove the event which is triggered when the tabs are switched, how am I supposed to react on the user activating another tab ?

Michael.

Reply by email

Felipe Monteiro de Carvalho
to Unknown author

I don't remember that OnPageChange was ever removed. TNotebook on the other hand was removed because it was implemented in a completely wrong way and it was substituted with a correct implementation.

From your comments it seams to me that you were using TNotebook like a

TPageControl, in this case you need to remove your TNotebook and use TPageControl instead:
http://wiki.lazarus.freepascal.org/Lazarus_0.9.30_release_notes#TNotebook_and_TPage

The correct TNotebook doesn't need a OnPageChange property because the user cannot change pages, this can only be done in code.

Felipe Monteiro de Carvalho

Reply by email

Mark Morgan Lloyd
to Unknown author: I have used TNotebook in a (commercial) project of mine. All worked well, till recently.…
Show quoted text 14 lines
Hi, I have used TNotebook in a (commercial) project of mine. All worked well, till recently. Now, I get an error "OnPageChange" property not found when loading the control in the DFM. Since this is the only useful event for this control, why on earth was it removed ? The only thing the user can do with this control, is switch tabs. If you remove the event which is triggered when the tabs are switched, how am I supposed to react on the user activating another tab ?

Are you sure about that error message?

TNotebook = class(TCustomNotebook)
..

   published

..

     property OnPageChanged;
Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Unknown author
to Mark Morgan Lloyd: Are you sure about that error message? TNotebook = class(TCustomNotebook) .. published ..…
Mark Morgan Lloyd wrote 17 lines
wrote: > Hi, > > I have used TNotebook in a (commercial) project of mine. > All worked well, till recently. > > Now, I get an error "OnPageChange" property not found when loading the > control in the DFM. > > Since this is the only useful event for this control, why on earth was it > removed ? > > The only thing the user can do with this control, is switch tabs. If you > remove the event which is triggered when the tabs are switched, how am I > supposed to react on the user activating another tab ? Are you sure about that error message?

Very. And I'm using trunk lazarus.

Michael.

Reply by email

Mark Morgan Lloyd
to Felipe Monteiro de Carvalho: On Wed, Apr 27, 2011 at 5:22 PM, Mark Morgan Lloyd Obviously you are not using Lazarus…
Felipe Monteiro de Carvalho wrote 7 lines
On Wed, Apr 27, 2011 at 5:22 PM, Mark Morgan Lloyd wrote: > Are you sure about that error message? > > TNotebook = class(TCustomNotebook) Obviously you are not using Lazarus SVN.

Whether I am using it or not is not relevant, I was referring to 0.9.30 sources to check the property name. Which is OnPageChanged, not OnPageChange.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email