Board index » delphi » Tabbed notebook with lockable pages?

Tabbed notebook with lockable pages?

I'm using tabbed pages to display information from a database.  I've
built some security into the database and now I'm trying to put some in
the app.  I was wondering if there exists a tab component that I can
disable specfic pages; that is, if I have four pages and the current
user only has access to page 0 and page 3, then the tabs for page 1 and
2 are greyed out.

Thanks in advance.

 

Re:Tabbed notebook with lockable pages?


Quote
In article <4b7i8u...@sophocles.algonet.se> w...@sophocles.algonet.se (Johan Alveborg) writes:
>Sharon Ball (s...@ix.netcom.com) wrote:
>: I'm using tabbed pages to display information from a database.  I've
>: built some security into the database and now I'm trying to put some in
>: the app.  I was wondering if there exists a tab component that I can
>: disable specfic pages; that is, if I have four pages and the current
>: user only has access to page 0 and page 3, then the tabs for page 1 and
>: 2 are greyed out.
>: Thanks in advance.
>I did it the easy way. When the user logs in to my app I assign null
>strings to the tabs that he's not supposed to see. This way unaccesible
>tabs show up very small and doesn't have text that might give the user
>any clues on what he's missing. Then on the click-event of the tabs I
>check if it's a null name, and if it is I do nothing.

You can't gray-out pages in the standard notebook that ships with Delphi 1.0
but I believe that there are third-party versions that support this.  It seems
that the notebook stuff barely made the cut on Delphi 1.0 and the source-code
to a lot of it didn't arrive on the VCL disk.  Unfortunately.  But things like
Orpheus (I think) provide similar functionality, and source.

/mr/

Re:Tabbed notebook with lockable pages?


Quote
Sharon Ball (s...@ix.netcom.com) wrote:

: I'm using tabbed pages to display information from a database.  I've
: built some security into the database and now I'm trying to put some in
: the app.  I was wondering if there exists a tab component that I can
: disable specfic pages; that is, if I have four pages and the current
: user only has access to page 0 and page 3, then the tabs for page 1 and
: 2 are greyed out.

: Thanks in advance.

I did it the easy way. When the user logs in to my app I assign null
strings to the tabs that he's not supposed to see. This way unaccesible
tabs show up very small and doesn't have text that might give the user
any clues on what he's missing. Then on the click-event of the tabs I
check if it's a null name, and if it is I do nothing.

   /Johan...!

Re:Tabbed notebook with lockable pages?


s...@ix.netcom.com (Sharon Ball ) wrote:

Quote
>I'm using tabbed pages to display information from a database.  I've
>built some security into the database and now I'm trying to put some in
>the app.  I was wondering if there exists a tab component that I can
>disable specfic pages; that is, if I have four pages and the current
>user only has access to page 0 and page 3, then the tabs for page 1 and
>2 are greyed out.
>Thanks in advance.

One way is to add the OnDrawTab(?) event and do your own string drawing based on
the TabIndex.

Other Threads