[Solved] Change the x/y position of a list box

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
Fraz627
Posts: 22
Joined: Sat Jun 17, 2017 8:31 am

[Solved] Change the x/y position of a list box

Post by Fraz627 »

Hello all
I've been searching for the correct way to change the screen coordinates of a list box via a macro
I'm able to change a lot of things ie background color ect.
But not the position

Any suggestions
Last edited by robleyd on Sat Apr 21, 2018 11:10 am, edited 1 time in total.
Reason: Tagged [Solved] [robleyd, Moderator]
Open Office 4.1 on Windows 10
User avatar
Zizi64
Volunteer
Posts: 11360
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: change the x/y position of a list box

Post by Zizi64 »

please upload your ODF type sample file with the macro code and a sample list box.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Fraz627
Posts: 22
Joined: Sat Jun 17, 2017 8:31 am

Re: Change the x/y position of a list box

Post by Fraz627 »

Thanks for you interest.
Attached is a workbook containing a simple list box and a macro to hide the list box.
Upon searching the internet and this forum could not find how to reposition the list box.

Thanks in advance
Attachments
list_box.ods
(10.23 KiB) Downloaded 126 times
Open Office 4.1 on Windows 10
User avatar
Zizi64
Volunteer
Posts: 11360
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Change the x/y position of a list box

Post by Zizi64 »

Here is a sample: how to modify the size and the position of a SHAPE object. You can identify a shape by its name (You must name it before) or its type...
Attachments
list_box_Zizi64.ods
(11.25 KiB) Downloaded 116 times
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
Posts: 11360
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Change the x/y position of a list box

Post by Zizi64 »

Sorry I forget to remove the commands related to the object inspection tool named 'XrayTool'.

I use the following subroutine to load it:

Code: Select all

Sub LoadXray

	If (Not GlobalScope.BasicLibraries.isLibraryLoaded("XrayTool")) Then
		GlobalScope.BasicLibraries.LoadLibrary("XrayTool")
	End If
end sub
(Install and use one of the object inspection tools like the MRI or XrayTool.)
Last edited by Zizi64 on Sun Apr 22, 2018 10:41 am, edited 1 time in total.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Fraz627
Posts: 22
Joined: Sat Jun 17, 2017 8:31 am

[Solved] Re: Change the x/y position of a list box

Post by Fraz627 »

Thanks now I see my mistake..
I wasn't putting struc in line of code

thanks again.
Open Office 4.1 on Windows 10
Post Reply