List Info

Thread: check visible state of a control




check visible state of a control
user name
2006-11-28 11:42:16
Hi Berend,

> One problem I ran into regarding
"setVisible()" is that the visibility 
> of an UnoControl is not set persistently when you
switch the steps of 
> the dialog.
> 
> In the following code
> 
> 	oControl = oDialog.getControl("TextField1")
> 	oControl.setVisible(false)
> 	oDialog.Model.Step = 1
> 	oDialog.Model.Step = 0	
> 	oDialog.execute()
> 
> the control "TextField1" will not be
invisible, because the steps of the 
>   dialog have been set back and forth afterwards.

which is one reason why I think the visibility problem
deserves
dedicated attention. Tampering with the visibility of the
control is a
hack, at best (which is fine, as long as there is no other
solution).
But the fact that this control-visibility is also used by
other
components - e.g. by a dialog, which implements its
step-handling by
adjusting visibilities - strongly supports that we need a
better
solution. Which would be a model-property
"Visible" (as you have a model
property "Enabled", instead of calling
"setEnable" at the control).

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer        
frank.schoenheitsun.com -
- Sun Microsystems                      http://www.sun.com/star
office -
- OpenOffice.org Database                   http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )