[lazarus] Notebook pages LM_SETITEMINDEX

Vincent Snijders vslist at zonnet.nl
Mon Dec 16 17:14:29 EST 2002


Thanks, Mattias.

At least now I don't have to worry about getting a message to select a page
which is about to be deleted, that was the main reason for the question.

I do think it is good that there is always a selected page, except when
there are no pages, then pageindex has to get another value (i.e. -1).

Attached is another patch. Lazarus is still crashing, but both notebook
examples work now, except for redrawing a page after a page is deleted.
I leave this for now.

Next I am going to look at menus, because LCL doesn't seem to get any  click
events for them. Unless somebody else has claimed them.

At the moment Martin Smat is looking into the toolbar buttons.
If somebody else is working on the win32 interface, please let us know, so
that double work is avoided.

Regards,
Vincent Snijders.


> -----Oorspronkelijk bericht-----
> Van: Mattias Gaertner [mailto:nc-gaertnma at netcologne.de]
> Verzonden: maandag 16 december 2002 10:26
> Aan: lazarus at miraclec.com
> Onderwerp: Re: [lazarus] Notebook pages LM_SETITEMINDEX
>
>
> On Sun, 15 Dec 2002 23:45:25 +0100
> "Vincent Snijders" <vslist at zonnet.nl> wrote:
>
> > Hi all,
> >
> > I am working on the notebook pages in win32 and I have a question.
> >
> > In line 662 of CustomNotebook.inc (part of TCustomNotebook.SetPageIndex)
> > FPageIndex is set to 0 if it is smaller than zero, just before
> sending the
> > LM_SETITEMINDEX message to the interface.
> >
> > The problem is that this message is also send on destroying pages
>
> I changed that.
>
>
> > and now it
> > is difficult to see, if the interface needs to show the a tabpage. Why
> > isn't -1 not a valid value for a PageIndex?
>
> IMO, if a notebook has pages, then there is also a top page. Gtk
> thinks the
> same (it will select the last as default). I didn't know, that Delphi and
> win32 supports no active page. For compatibility I removed the auto
> selection.
>
>
> > Why can't -1 be sent as a page
> > index? I seem to have no way of detecting an empty notebook, because
> > Pages.Count is still 1.
>
>
> Mattias
>
> _________________________________________________________________
>      To unsubscribe: mail lazarus-request at miraclec.com with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives

-------------- next part --------------
A non-text attachment was scrubbed...
Name: zip00006.zip
Type: application/octet-stream
Size: 1074 bytes
Desc: "diff.page.zip"
Url : http://localhost/pipermail/lazarus/attachments/20021216/126d0e5d/zip00006.obj


More information about the Lazarus mailing list