| View previous topic :: View next topic |
| Author |
Message |
ottoshmidt1 Power User


Joined: 15 May 2009 Posts: 69 Location: Tbilisi, Georgia
|
Posted: Tue Feb 02, 2010 12:09 am Post subject: [Solved]Form Control Visible/Invisible with macro |
|
|
Hi,
Form Controls in ooo 3.2 have option Visible (Yes, No)... Can I access that property with macros?
I have tried: .visbible = 0 (just like .enabled = 0) but that didn't work...
Is there any possible way? _________________ [Solved] mark in title significantly facilitates the work of those who try to help. So please, be gentle and don't forget to insert it.
IRC: /join #openoffice.org on irc.freenode.net
Last edited by ottoshmidt1 on Thu Feb 04, 2010 11:07 pm; edited 1 time in total |
|
| Back to top |
|
 |
QuazzieEvil Super User

Joined: 17 Jan 2007 Posts: 599 Location: Houston, TX
|
Posted: Tue Feb 02, 2010 5:24 am Post subject: |
|
|
Are you using the control's Model or View?
To hide/show a control, you need to use the View:
1) Get Control Model : oModel= Form.getByName("txtName")
2) Get View: oView= FormDocument.CurrentControler.getControl(oModel)
4) Set Visibility: oView.setVisible(True) | oView.setVisible(False) _________________ Free Docs @ http://www.baseprogramming.com/resources.html
Book @ lulu.com http://www.lulu.com/content/2455551 |
|
| Back to top |
|
 |
ottoshmidt1 Power User


Joined: 15 May 2009 Posts: 69 Location: Tbilisi, Georgia
|
Posted: Thu Feb 04, 2010 11:07 pm Post subject: |
|
|
| QuazzieEvil wrote: | Are you using the control's Model or View?
To hide/show a control, you need to use the View:
1) Get Control Model : oModel= Form.getByName("txtName")
2) Get View: oView= FormDocument.CurrentControler.getControl(oModel)
4) Set Visibility: oView.setVisible(True) | oView.setVisible(False) |
Great Thanks!  _________________ [Solved] mark in title significantly facilitates the work of those who try to help. So please, be gentle and don't forget to insert it.
IRC: /join #openoffice.org on irc.freenode.net |
|
| Back to top |
|
 |
|