[lazarus] Notebook pages LM_SETITEMINDEX
Mattias Gaertner
nc-gaertnma at netcologne.de
Mon Dec 16 04:18:07 EST 2002
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
More information about the Lazarus
mailing list