The whole window frame inner border

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 whole window frame inner border

Post by arfgh »

in forms, the whole window border has a inner tiny frame that is visible, like a big square into the window borders.
I want to access it with the api in order to make that frame border size = 0 for cosmetic purposes.
I have been meesing with the activewindow frame object without lucky at the moment...

And other than that, i am also trying to see if with the api is possible to hide the window borders... i mean no win32 api way, just native way. Is it possible ?

some help would be apreciated.
Last edited by arfgh on Thu Jul 02, 2020 11:48 am, edited 1 time in total.
OpenOffice last version | Mageia Linux x64 | Ubuntu Linux | Windows 8.1 Enterprise x64 | Java last version
User avatar
RoryOF
Moderator
Posts: 34610
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: The whole window frame inner border

Post by RoryOF »

Please list the code you have used, to give us a head start. Surround the code with code brackets - use Full editor, select your code and press the Code button.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
arfgh
Posts: 566
Joined: Tue Mar 05, 2013 6:44 pm

Re: The whole window frame inner border

Post by arfgh »

well, i am here but i obtain no childs. 'Frame' is the active window. But i am not sure if i am walking in the good direction to reach the objetive...

Code: Select all

sub WindowFrame(frame as object)
	dim oAC as object, role as object, i as byte
	oAC = frame.ComponentWindow.AccessibleContext.AccessibleParent.AccessibleContext.AccessibleParent.AccessibleContext 'INTERNAL_FRAME
	for i = 0 to oAC.accessibleChildCount - 1                               
		role = SearchForChild(oAC, "", "", com.sun.star.accessibility.AccessibleRole.INTERNAL_FRAME)
		if not IsNull(role) then
			beep
			exit for                             
		end if                                                           
	next                     
end sub
function SearchForChild(oAC as Object, sName as String, sDescription as String, lRole as Long) as Object
	dim i as byte, oACChild as object, bfound as boolean
    for i = 0 to oAC.AccessibleChildCount - 1
		oACChild = oAC.getAccessibleChild(i)
      	if not HasUnoInterfaces(oACChild, "com.sun.star.accessibility.XAccessibleContext") then
        	if HasUnoInterfaces(oACChild, "com.sun.star.accessibility.XAccessible") then
          		oACChild = oACChild.AccessibleContext
          	else
          		exit function 'unexpected situation, maybe caused by some intermediate state
          	end if
        end if
      	bfound = true
      	if sName <> "" then bfound = bFound and (oACChild.AccessibleName = sName)
      	if sDescription <> "" then bfound = bFound and (oACChild.AccessibleDescription = sDescription)
      	if lRole > -1 then bfound = bfound and (oACChild.AccessibleRole = lRole)               
		if bfound then
        	SearchForChild = oACChild
        	exit function
        end if
	next
end function
OpenOffice last version | Mageia Linux x64 | Ubuntu Linux | Windows 8.1 Enterprise x64 | Java last version
JeJe
Volunteer
Posts: 2778
Joined: Wed Mar 09, 2016 2:40 pm

Re: The whole window frame inner border

Post by JeJe »

My guess is if you find anything it'll be read only and you're wasting your time.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
arfgh
Posts: 566
Joined: Tue Mar 05, 2013 6:44 pm

Re: The whole window frame inner border

Post by arfgh »

JeJe, not necessarily. Before to find a better way to disable vertical scroll bar, i was able to do it altering the accessibleContext...
OpenOffice last version | Mageia Linux x64 | Ubuntu Linux | Windows 8.1 Enterprise x64 | Java last version
JeJe
Volunteer
Posts: 2778
Joined: Wed Mar 09, 2016 2:40 pm

Re: The whole window frame inner border

Post by JeJe »

Great... two different guesses... with a measurable outcome. I think you should count up the hours you spend on this one and post again when you succeed / give up... (with the tally...)
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
arfgh
Posts: 566
Joined: Tue Mar 05, 2013 6:44 pm

Re: The whole window frame inner border

Post by arfgh »

here i show a capture of the inner frame i am saying. This capture show the window once its caption and window border is disabled, but that little inner frame around is what i want to alter.
2020-07-02-232325.jpg
https://i.postimg.cc/kXCkXn6C/2020-07-02-232325.jpg
Last edited by MrProgrammer on Fri Jul 03, 2020 12:03 am, edited 1 time in total.
Reason: Uploaded image, since file on posting.cc will disappear eventually
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 whole window frame inner border

Post by arfgh »

at the moment i havent found no way to alter that frame, but maybe somebody know a way to do it using the win32 api directly ?
reason to achieve this, just want to keep content but not that 3D border, with the intention to hide a layer color in order to make it transparent. So the problem is just that 3D border that is surrounding the whole document content....
OpenOffice last version | Mageia Linux x64 | Ubuntu Linux | Windows 8.1 Enterprise x64 | Java last version
Post Reply