Hichem-elAbassi / j4me

Automatically exported from code.google.com/p/j4me
0 stars 0 forks source link

Is there any problem method visible(boolean visible) of class Component? #43

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
eg:

CheckBox checkbox = new CheckBox();
checkbox.setLabel("I agree to the terms." );
checkbox.setChecked( true );
checkbox.visible(false);
append( checkbox );

the "checkbox" can shown on the screen,I thank,if checkbox.visible
(false),the "checkbox" should hide,else if checkbox.visible
(true),the "checkbox" can shown on the screen.

Who can help me?sometimes,I need hide the component Instead of delete the 
component.

Original issue reported on code.google.com by suruihu...@gmail.com on 27 Jun 2008 at 5:40

GoogleCodeExporter commented 9 years ago
Sorry I've been out and haven't replied.

The .visible() method is used to tell a component if it is visible on the 
screen or
not.  Not to remove the component as you want.  Currently that doesn't exist so 
I'm
changing this to a feature request.

For now I think the only solution is to delete and add the component back to the
dialog as needed.  It sounds like there is a problem doing that.  What is it?  
It
will be helpful for me to know when building this functionality.

Original comment by deanbro...@gmail.com on 30 Jun 2008 at 5:51