The accessible vertical bar

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
arfgh
Posts: 566
Joined: Tue Mar 05, 2013 6:44 pm

The accessible vertical bar

Post by arfgh »

Hey friends !

is there a way to open a form document directly without the accessible vertical bar ?
I know that with the api there is a way to hide it, not easy way. But what i want is to know if exist some way to just open the form document with that feature just disabled.

thx in advance
OpenOffice last version | Mageia Linux x64 | Ubuntu Linux | Windows 8.1 Enterprise x64 | Java last version
arfgh
Posts: 566
Joined: Tue Mar 05, 2013 6:44 pm

Re: The accessible vertical bar

Post by arfgh »

anybody ? calling Mr Villeroy .......
OpenOffice last version | Mageia Linux x64 | Ubuntu Linux | Windows 8.1 Enterprise x64 | Java last version
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: The accessible vertical bar

Post by Villeroy »

Accessible vertical bar :?: Which accessible vertical bar :?:
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
arfgh
Posts: 566
Joined: Tue Mar 05, 2013 6:44 pm

Re: The accessible vertical bar

Post by arfgh »

the vertical one that ALWAYS appears on all document. Even if is needed to scroll, and even if not.
So in my design i dont need it, and i want to disable it, but just when the frame or windows is created.
OpenOffice last version | Mageia Linux x64 | Ubuntu Linux | Windows 8.1 Enterprise x64 | Java last version
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: The accessible vertical bar

Post by Villeroy »

I don't know.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
arfgh
Posts: 566
Joined: Tue Mar 05, 2013 6:44 pm

Re: The accessible vertical bar

Post by arfgh »

strange villeroy, you always gave a possible way....
OpenOffice last version | Mageia Linux x64 | Ubuntu Linux | Windows 8.1 Enterprise x64 | Java last version
UnklDonald418
Volunteer
Posts: 1544
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: The accessible vertical bar

Post by UnklDonald418 »

If you are referring to the scroll bar on the right border of all user sizable windows I believe those are maintained by the operating system. If I recall correctly (I haven't worked on a windows application since the days of Windows 95), when an application (i.e. Open Office) requests a new window from the operating system, it can specify a number of options including if that window is sizable and whether it will have scroll bars.
Despite the fact that you have taken pains to design a document that shows everything on a single screen, since it is sizable a user can easily undo that making scroll bars necessary.

The size of a dialog window is fixed at design time and so those scroll bars don't appear on a dialog. You can add a scroll bar to a dialog but it only works on controls added to the dialog, not the main dialog window.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
arfgh
Posts: 566
Joined: Tue Mar 05, 2013 6:44 pm

Re: The accessible vertical bar

Post by arfgh »

so then we can only hide it ? not control it ?
OpenOffice last version | Mageia Linux x64 | Ubuntu Linux | Windows 8.1 Enterprise x64 | Java last version
RPG
Volunteer
Posts: 2250
Joined: Tue Apr 14, 2009 7:15 pm
Location: Netherlands

Re: The accessible vertical bar

Post by RPG »

The explanation of UnklDonald418 makes clear to me what possible was asked. I did first think to open form who are in a database document.

Code: Select all

dim oDoc
oDoc=thiscomponent.currentcontroller.ViewSettings '.ShowVertScrollBar
oDoc.ShowVertScrollBar=false 'This does not show the scrollbar
print oDoc.ShowVertScrollBar
Romke
LibreOffice 7.1.4.2 on openSUSE Leap 15.2
arfgh
Posts: 566
Joined: Tue Mar 05, 2013 6:44 pm

Re: The accessible vertical bar

Post by arfgh »

ok RPG, that worked. I cant understand how i did no able to locate that property !!
anyways, i used your way when the form is initialized and we can see the vertical bar for a moment and/or the clear colored zone where it fits, just tha same with my code when hidding the accessible content, more complex procedure than your simply way.

So the main quest still persists, how to control it to the point that we dont see it appears ?

Edit: i guess if we can do just the same for the Scroll pane.... i access it using 'com.sun.star.accessibility.AccessibleRole.SCROLL_PANE' but that's the complex way.
OpenOffice last version | Mageia Linux x64 | Ubuntu Linux | Windows 8.1 Enterprise x64 | Java last version
RPG
Volunteer
Posts: 2250
Joined: Tue Apr 14, 2009 7:15 pm
Location: Netherlands

Re: The accessible vertical bar

Post by RPG »

arfgh wrote:So the main quest still persists, how to control it to the point that we dont see it appears ?
I have no answer for this question. I never use it.

It can be more easy. Make a button with this command:

Code: Select all

.uno:VScroll
VScroll Is a list of urls you can use.

I think it is real important to stay real short to the API of OpenOffice. It seems to me that this is true for all API's.

I did only test this, 5 mininutes, in a form what I have used for long time. The form is real complex form with moving frames but real short to the API.

Romke
LibreOffice 7.1.4.2 on openSUSE Leap 15.2
RPG
Volunteer
Posts: 2250
Joined: Tue Apr 14, 2009 7:15 pm
Location: Netherlands

Re: The accessible vertical bar

Post by RPG »

You can also easy add such a button to a menu or toolbar: search for: vertical scroll bar.

Romke
LibreOffice 7.1.4.2 on openSUSE Leap 15.2
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: The accessible vertical bar

Post by Villeroy »

Code: Select all

Sub hideVScroll()
	ShowScrollbar "VScroll", False
End Sub

Sub showVScroll()
	ShowScrollbar "VScroll", True
End Sub

Sub hideHScroll()
	ShowScrollbar "HScroll", False
End Sub

Sub showHScroll()
ShowScrollbar "HScroll", True
End Sub

sub ShowScrollbar(s As String, b As Boolean)
	frame = ThisComponent.CurrentController.Frame
	dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
	dim args1(0) as new com.sun.star.beans.PropertyValue
	args1(0).Name = s
	args1(0).Value = b
	dispatcher.executeDispatch(frame, ".uno:"& s, "", 0, args1())
end sub
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
arfgh
Posts: 566
Joined: Tue Mar 05, 2013 6:44 pm

Re: The accessible vertical bar

Post by arfgh »

yes friends, but a button to click is not the main idea. My form designs need no scrollbar, so i wanted to keep it disabled, and of course not coming when openening the forms at first. For that reason i always thought on the 'initialize' event....
OpenOffice last version | Mageia Linux x64 | Ubuntu Linux | Windows 8.1 Enterprise x64 | Java last version
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: The accessible vertical bar

Post by Villeroy »

Form document's open event or view created event:

Code: Select all

Sub form_doc()
  hideVScroll
End Sub
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
arfgh
Posts: 566
Joined: Tue Mar 05, 2013 6:44 pm

Re: The accessible vertical bar

Post by arfgh »

Villeroy, what you mean on that last ?
OpenOffice last version | Mageia Linux x64 | Ubuntu Linux | Windows 8.1 Enterprise x64 | Java last version
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: The accessible vertical bar

Post by Villeroy »

Embedded forms open in web view and do not show any scroll bars as long as the form controls fit on the page. If not, the scroll bar is a useful GUI element.
The attached text document uses event "view created" and hides scroll bars.
Attachments
hideScrolls.odt
(9.86 KiB) Downloaded 152 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
arfgh
Posts: 566
Joined: Tue Mar 05, 2013 6:44 pm

Re: The accessible vertical bar

Post by arfgh »

oh ! good idea, instead of form initialized event, the view created !!
OpenOffice last version | Mageia Linux x64 | Ubuntu Linux | Windows 8.1 Enterprise x64 | Java last version
RPG
Volunteer
Posts: 2250
Joined: Tue Apr 14, 2009 7:15 pm
Location: Netherlands

Re: The accessible vertical bar

Post by RPG »

I do work with a form in a databasedocument. When I disable the vertical toolbar I do not see it until I enable the vertical toolbar. I do base this only on 5 minutes testing and store it one time and open it the other day.

Romke
LibreOffice 7.1.4.2 on openSUSE Leap 15.2
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: The accessible vertical bar

Post by Villeroy »

arfgh wrote:oh ! good idea, instead of form initialized event, the view created !!
I'm not sure if/how this works with embedded forms. Why do you need to do this anyway? My forms don't show any scroll bar.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
arfgh
Posts: 566
Joined: Tue Mar 05, 2013 6:44 pm

Re: The accessible vertical bar

Post by arfgh »

like i said villeroy, my current forms design in the DB need no scrollbars. And that vertical one always is there, even if we need it or not. So i just hide it and also its scrollpane using the accessibility part of the api. It is a complex subroutine and i was guessing if exist in AOO some way to disable it and control it.
OpenOffice last version | Mageia Linux x64 | Ubuntu Linux | Windows 8.1 Enterprise x64 | Java last version
Post Reply