Ask Your Question
0

How to use XGridRowSelection

asked 2018-10-04 17:24:27 +0200

Tech_JA gravatar image

Hi, My name is Jorge, is the first time I participate in this forum.

I'm a noob, not a programmer but I'm trying to understand how to use macros on LO My question is very simple and I need your kindness to explain me how can I use the Uno Interface for this example:

REM Select row 7
Sub SelectRow()    
    DIM Test    
    Test = createUnoService("com.sun.star.awt.grid.UnoControlGrid") 
    Test.selectRow(7)        
End Sub

I get an error and I don't know what I need to do to solve it:

image description

I already googled it, viewd other macros but can't understand how to correct it

I've already checked in the LibreOffice SDK API Reference but for me misses an example to understand how to use the interface - I know, this is an API Reference..

Could you please help me?

Best regards

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2018-10-04 18:55:50 +0200

Ratslinger gravatar image

updated 2018-10-04 19:05:04 +0200

Hello,

I believe your understanding of the service is incorrect. com.sun.star.awt.grid.UnoControlGrid is A control that displays a set of tabular data. See this page ->service UnoControlGrid.

If you want to see this in working code, see my question here -> Looking to create grid (not table) control on Base form. There is a LO Base sample there which contains the code to display dialog which contains the grid control. If Base is not set up on your system, you can still look at the code there.

If you are seriously interested in macros/uno API, check out Open Office Macros Explained by Andrew Pitonyak. PDF here -> OOME.

edit flag offensive delete link more

Comments

@Ratslinger, thanks for your answer. I will look now your links - Thanks!

Tech_JA gravatar imageTech_JA ( 2018-10-04 21:13:57 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-10-04 17:24:27 +0200

Seen: 41 times

Last updated: Oct 04 '18