pagepanel, containercontrol and switching panels.

I am having one of those moments when my brain isn’t firing on all cylinders.

I have a pagepanel (pagepanel1) in a window (window1). on the first panel (value=0) I have a containercontrol (cc1) that has a button (button1) that I want to push the button to change to panel 2 (value=1). but for some odd reason when I put in the button1.action event parent.value=1 xojo doesn’t recognize “value”. but it has “panelindex”, “tabindex”, tabpanelindex", etc.

I know I am doing something fairly simple that is wrong. but can’t figure out what it is. Please help on this wonderful Sunday.

thanks
sb

the parent for the button isn’t the pagepanel - its the container

to be honest the best thing you could do is add an event definition to the container that the pushbutton, in its action event raises that event

then when you put a container on a layout / page panel etc you implement that event on the container instance

[quote=229877:@Norman Palardy]the parent for the button isn’t the pagepanel - its the container

to be honest the best thing you could do is add an event definition to the container that the pushbutton, in its action event raises that event

then when you put a container on a layout / page panel etc you implement that event on the container instance[/quote]

Norm. Thanks!! like I said brain = mush today. It works like it should.