OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

[Solved]Form Control Visible/Invisible with macro

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
ottoshmidt1
Power User
Power User


Joined: 15 May 2009
Posts: 69
Location: Tbilisi, Georgia

PostPosted: Tue Feb 02, 2010 12:09 am    Post subject: [Solved]Form Control Visible/Invisible with macro Reply with quote

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. Wink

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
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
QuazzieEvil
Super User
Super User


Joined: 17 Jan 2007
Posts: 599
Location: Houston, TX

PostPosted: Tue Feb 02, 2010 5:24 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
ottoshmidt1
Power User
Power User


Joined: 15 May 2009
Posts: 69
Location: Tbilisi, Georgia

PostPosted: Thu Feb 04, 2010 11:07 pm    Post subject: Reply with quote

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! Cool
_________________
[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. Wink

IRC: /join #openoffice.org on irc.freenode.net
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group