Clean Form

Creating and using forms
Post Reply
User avatar
Scramasax
Posts: 2
Joined: Sat Jun 28, 2008 9:20 pm

Clean Form

Post by Scramasax »

Is there a way to have a form displayed without all the writer toolbars and menus? (A form in a simple window.) My clients are in the construction biz and they don't dig all the clutter.

Any help is greatly appreciated. :geek:
OOo 2.3.X on Ms Windows XP
QuazzieEvil
Volunteer
Posts: 283
Joined: Tue Dec 04, 2007 6:38 pm
Location: Houston, TX

Re: Clean Form

Post by QuazzieEvil »

try the following:

Code: Select all

Sub removeUnwantedToolbars(Event As Object)
	Dim Doc As Object
	Dim Frame As Object
	Dim Layout As Object
	Dim Element As Object
	Dim I As Integer
	Dim strURL As String
	Dim Allowed
	Dim CDA(4) As New com.sun.star.beans.PropertyValue	
	'Allowed=Array("private:resource/menubar/menubar","private:resource/toolbar/formsnavigationbar")
	Doc=Event.Source.Parent.Parent
	'xray doc
	Frame=Doc.CurrentController.Frame
	Layout=Frame.LayoutManager 

	For I=0 To UBound(Layout.Elements)
		strURL=Layout.Elements(I).ResourceURL
		'If Not isIN(strURL,Allowed) Then
		Layout.hideElement(strURL)
		'End If
	Next I
End Sub
Post Reply