yugicm
Posts: 4
|
Posted: 07/04/2006, 12:20 AM |
|
hi all,
i have little problem (i hope) . for examples i have 2 button (button1 and button2) and 2 panel(panel1 and panel2) in my page. what i would like to do is, if i press the button1 then panel1 show and panel2 hide, and if i press the button2 then panel1 hide and panel2 show. what code should i write in the custom code for this example. please help me.
thanks
yugi
|
|
|
MWarloc
|
Posted: 07/04/2006, 2:05 AM |
|
You can use hide-show action with expression codition.
You can use custom code like this
if (e.getPage().getHttpGetParameter("zzz")) {
e.getChild("Panel1").setVisible(false)
}
in before show event of panel.
of course condition can chack is button pressed status or somthing else.
|
|
|
WKempees
|
Posted: 07/04/2006, 3:23 AM |
|
And the Panels Visibility property must be set Dynamic
"MWarloc" <MWarloc@forum.codecharge> schreef in bericht
news:944aa2f4c13f10@news.codecharge.com...
> You can use hide-show action with expression codition.
> You can use custom code like this
> if (e.getPage().getHttpGetParameter("zzz")) {
> e.getChild("Panel1").setVisible(false)
> }
> in before show event of panel.
> of course condition can chack is button pressed status or somthing else.
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
yugicm
Posts: 4
|
Posted: 07/05/2006, 3:42 AM |
|
thank you for all your support, but i still have problem. first, in the before show of event panel i have to modify a little, so it become:
if (e.getPage().getHttpGetParameter("zzz")==null) {
e.getPage().getChild("Panel1").setVisible(false);
} else {
e.getPage().getChild("Panel1").setVisible(true);
}
then the next problem is, i still don't have a clue, how to use action hide-show component. so, everytime i hit the button, there's no action happened. and in the panel property, it doesn't have the visibility, so i cann't change it into dynamic. can u guys help me please.
thanks
yugi
|
|
|
WKempees
|
Posted: 07/05/2006, 3:54 AM |
|
I mixed up my settings, in Design, properties for the Panel
You can set Visible to No or Yes, to define the initial state.
Walter
|
|
|
|