Page panel page limit?

Am using a page panel on the main window of my app and wonder if there is a limit or “better to not go above X number” to pages in the page panel?

I’m wondering if for example some calendar controls which have pretty specific functions depending on if it is a year/month/week/day shown can just be each “view” on its own page without any problem.

Also, is it still a bad Idea to place Tab Panel on pages of a PagePanel? I believe that several years ago this was an issue.

One more thing - what about two page panels on a window? For example the main page panel and then a pagepanel that slides in ilke the inspector on the IDE which would also have several pages.

If your design requires more that 5 or 6 panels , I highly suggest you rethink your approach.

Most Calendar controls use a single canvas approach… and draw what ever month/year is required… selection is done by examining the coordinates of the click in relation to what was drawn.

TabPane inside PagePanel (or vice-versa) does “work” now, but again probably not the best approach

Stacking controls is also not a very good idea in Windows, as it usually flickers.

Ah, thanks. I can’t say it requires so many, but I’d seen some posts of people who were having over 40 pages, and that seemed odd but made me think it was maybe okay. I can probably get most of the calendars onto on page, so I’ll try going that route.

But probably I’d not go over 11-12 pages even if I kept all my calendars on their own pages. Thing is, a “week” view for example will come with different controls than a “day” view.

I shall wrack my brain some more…

Instead of going at it by the nuts and bolts, why don’t you try to explain what you want to achieve ?

Sounds like you need 3-4 pages

  1. day view
  2. week view
  3. month view
  4. year view

and each of those dynamically draws whatever would be “the right calendar” for that view & time period

Thanks, Normam. That’s the way I’m leaning, though I’ll have six different calendars plus another 4-5 pages that are not calendars.

Michel - I was interested in the general question as a “principle”, to be honest. But in short, each view will need to give the user a different set of controls. For example, the day view page will have a few canvasses for Charts under the calendar, while the week view will have a slew of buttons and popup menus (probably in a listbox actually), and the month view will be acting more like a “normal” calendar. Also, I’m needing to subclass the different views with various properties and it’s possible that I may have one calendar calling on the properties of another to query the database.

Sounds like I can probably get away with it.

sounds like maybe you want container controls embedded on different panels


just swap container controls and dont use a pagepanel at all

You don’t need a view per month, you need one month view and change the content. Same thing for week, day, year.

A tabpanel for each view and a canvas inside to display data, plus some buttons can do the trick.

I regularly use a calendar for iPhone
It has Day view, week view, month view, and a list of holidays for each month. That represents pages, and on each a canvas that displays data according to the dates.

It does not seem to require 365 pages for days, 30 pages for month, or 52 for week.

Sure, it’s clear that a month view has the “next month” “previous month” method. I pretty clear on the calendar aspect.

Anyhow, this has derailed somewhat from my original question which was more about the principle.

Which is: regardless of the app and approach, does using a lot of pages in a page panel affect performance in ways I should be aware of being going that route. (With no regard for what I intend to do).

This thread:

where people mention using 19 or 50 pages is what prompted my question.

Unless I am mistaken, there is no real limit in the number of pages besides memory.

But Xojo engineers could probably give a more precise answer.

Experimentally, it is easy to add 1000s of pages using Append.

I have a PagePanel that I use for a Help window and it has over 50 panels. I have not noticed any problems with it. On some of the panel pages are tab panels too.

David, out of curiosity do you use a panel with container controls for the pages, or do you have each page designed in the window?

Since I use the same Help in multiple applications, I have an external Container that I place onto any window. That container holds a popup menu (for user choices) and a page panel. The container also has a tab panel with the user Options, a Description and an Example. On the options tab is the Page panel with over 50 pages.

I have a method inside the container where I pass it a category and subcategory of help. It looks up an SQLite database and returns the page panel number, the description and the example text. This way I can keep the SQLite database up to date and the Help panel adjusts automatically. The Help panel has more items than any single program needs, but it saves me LOTS of coding!