The accessible vertical bar

Creating a macro - Writing a Script - Using the API

The accessible vertical bar

Postby arfgh » Mon Jan 22, 2018 10:11 pm

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 - Windows 8.1 Enterprise x64 - Windows XP x64 SP2
arfgh
 
Posts: 420
Joined: Tue Mar 05, 2013 6:44 pm

Re: The accessible vertical bar

Postby arfgh » Sun Jan 28, 2018 5:51 pm

anybody ? calling Mr Villeroy .......
OpenOffice last version - Windows 8.1 Enterprise x64 - Windows XP x64 SP2
arfgh
 
Posts: 420
Joined: Tue Mar 05, 2013 6:44 pm

Re: The accessible vertical bar

Postby Villeroy » Mon Jan 29, 2018 12:25 am

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, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26251
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: The accessible vertical bar

Postby arfgh » Mon Jan 29, 2018 12:31 am

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 - Windows 8.1 Enterprise x64 - Windows XP x64 SP2
arfgh
 
Posts: 420
Joined: Tue Mar 05, 2013 6:44 pm

Re: The accessible vertical bar

Postby Villeroy » Mon Jan 29, 2018 12:55 am

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, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26251
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: The accessible vertical bar

Postby arfgh » Mon Jan 29, 2018 1:31 am

strange villeroy, you always gave a possible way....
OpenOffice last version - Windows 8.1 Enterprise x64 - Windows XP x64 SP2
arfgh
 
Posts: 420
Joined: Tue Mar 05, 2013 6:44 pm

Re: The accessible vertical bar

Postby UnklDonald418 » Mon Jan 29, 2018 7:43 pm

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.6 & LibreOffice 6.1.1.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1034
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: The accessible vertical bar

Postby arfgh » Mon Jan 29, 2018 9:00 pm

so then we can only hide it ? not control it ?
OpenOffice last version - Windows 8.1 Enterprise x64 - Windows XP x64 SP2
arfgh
 
Posts: 420
Joined: Tue Mar 05, 2013 6:44 pm

Re: The accessible vertical bar

Postby RPG » Mon Jan 29, 2018 9:01 pm

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   Expand viewCollapse view
dim oDoc
oDoc=thiscomponent.currentcontroller.ViewSettings '.ShowVertScrollBar
oDoc.ShowVertScrollBar=false 'This does not show the scrollbar
print oDoc.ShowVertScrollBar


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

Re: The accessible vertical bar

Postby arfgh » Mon Jan 29, 2018 9:11 pm

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 - Windows 8.1 Enterprise x64 - Windows XP x64 SP2
arfgh
 
Posts: 420
Joined: Tue Mar 05, 2013 6:44 pm

Re: The accessible vertical bar

Postby RPG » Mon Jan 29, 2018 9:45 pm

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   Expand viewCollapse view
.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 6.1.3.2 on openSUSE Leap 15
RPG
Volunteer
 
Posts: 2153
Joined: Tue Apr 14, 2009 7:15 pm
Location: Netherlands

Re: The accessible vertical bar

Postby RPG » Mon Jan 29, 2018 9:52 pm

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

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

Re: The accessible vertical bar

Postby Villeroy » Tue Jan 30, 2018 10:20 am

Code: Select all   Expand viewCollapse view
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, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26251
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: The accessible vertical bar

Postby arfgh » Tue Jan 30, 2018 1:38 pm

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 - Windows 8.1 Enterprise x64 - Windows XP x64 SP2
arfgh
 
Posts: 420
Joined: Tue Mar 05, 2013 6:44 pm

Re: The accessible vertical bar

Postby Villeroy » Tue Jan 30, 2018 2:31 pm

Form document's open event or view created event:
Code: Select all   Expand viewCollapse view
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, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26251
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: The accessible vertical bar

Postby arfgh » Tue Jan 30, 2018 2:38 pm

Villeroy, what you mean on that last ?
OpenOffice last version - Windows 8.1 Enterprise x64 - Windows XP x64 SP2
arfgh
 
Posts: 420
Joined: Tue Mar 05, 2013 6:44 pm

Re: The accessible vertical bar

Postby Villeroy » Tue Jan 30, 2018 5:41 pm

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 36 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26251
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: The accessible vertical bar

Postby arfgh » Tue Jan 30, 2018 6:44 pm

oh ! good idea, instead of form initialized event, the view created !!
OpenOffice last version - Windows 8.1 Enterprise x64 - Windows XP x64 SP2
arfgh
 
Posts: 420
Joined: Tue Mar 05, 2013 6:44 pm

Re: The accessible vertical bar

Postby RPG » Tue Jan 30, 2018 8:32 pm

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 6.1.3.2 on openSUSE Leap 15
RPG
Volunteer
 
Posts: 2153
Joined: Tue Apr 14, 2009 7:15 pm
Location: Netherlands

Re: The accessible vertical bar

Postby Villeroy » Tue Jan 30, 2018 11:37 pm

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, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26251
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: The accessible vertical bar

Postby arfgh » Wed Jan 31, 2018 1:04 am

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 - Windows 8.1 Enterprise x64 - Windows XP x64 SP2
arfgh
 
Posts: 420
Joined: Tue Mar 05, 2013 6:44 pm


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 3 guests