Pagepanel with desktopcontainers

Hit a brick wall today, don’t see any solution. I have a desktop project with a couple of pages, so I am using pagepanel. there are 2 pages, which are desktopcontainers, these containers have buttons in them.

if I add the two containers to the page panels, then the buttons do not work correcty (if they are in the same space on the screen) it seems to fire the one from page0 and even if page 1 is displayed, clicking the button on page one does not get fired. I think this maybe a bug in xojo.

Anyone seen this?, more important has anyone found a solution. I guess i could put all the objects in the page panel and dump the containers, however this would end up with a lot of objects on one page.


Are you sure that the 2 containers are actually on DIFFERENT pages?

Remove and add them again to be sure.

Yes on different pages, using the icon at the bottom of the ide you can switch between them fine.

this might sound crazy but why if you use a PagePanel instead of DesktopPagePanel ?

ie/ does sticking with the API 1 classes work and API 2 not ?

almost sounds like you get clickthrough behaviour

Hi Dave,
I don’t know that this workaround will work, but just a thought:
Could you put a button in the window, on top of the page panel with code something like:
If pagepanel = 1, then ContainerButton1.push.


I don’t know what version Xojo or OS you are using but I do have several projects that have identical container placements on separate pagepanels (in both API1 and API2) and do not see this problem anywhere.

If your containers are indeed on separate pagepanels then I would look at if the containers are, in fact, unique and not clones and not pointing to the same instance of the parent object.

Are you able to replicate this in a new demo project and upload it?

1 Like