How to reference windows and frames ?

Discuss the database features
Post Reply
arfgh
Posts: 566
Joined: Tue Mar 05, 2013 6:44 pm

How to reference windows and frames ?

Post by arfgh »

Hey there.

Since with base we can have several windows forms openeed at same time, is there a way to reference from a macro to these windows and the frames on each ?
I see this part complex, because using the MRI isnt clear for me, and i failed :(
I was able to reference current frame and even detect when that frame is active or not. But related to other opened form windows, i was unable to reference the those windows and the frames on them.

please help
OpenOffice last version | Mageia Linux x64 | Ubuntu Linux | Windows 8.1 Enterprise x64 | Java last version
FJCC
Moderator
Posts: 9274
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: How to reference windows and frames ?

Post by FJCC »

This simple code prints title of each open document. Does it help address your problem?

Code: Select all

Docs = Stardesktop.getComponents
DocsList= Docs.createEnumeration
Do While DocsList.hasMoreElements
	Doc = DocsList.nextElement
	print Doc.Title
Loop
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
arfgh
Posts: 566
Joined: Tue Mar 05, 2013 6:44 pm

Re: How to reference windows and frames ?

Post by arfgh »

yes FJCC ! that helped a lot. Thx so much.

What i want to do is to check each frame on each window to know if was resized with the intention to center the design.
And i am guessing how to use the 'com.sun.star.frame.XFrame' method 'windowResized'...
OpenOffice last version | Mageia Linux x64 | Ubuntu Linux | Windows 8.1 Enterprise x64 | Java last version
Post Reply