Hi Lars!
Thanks for trying out rGrid!
First, there is a new rGrid version 1.6.0 just released.
Please use this version as it fixes a few bugs related to the cut, copy and paste features in 1.5.1
It also adds the ability to copy and paste cell content directly from Excel.
Download from here:
http://tapirsoft.on-rev.com/rGrid
To get rGrid up and running, You do
not have to put the "rGridEngine" stack into the plugins folder.
Just follow the steps here below.
Getting started:
1. Open the "rGridEngine" stack
2. Make the "rGridEngine" stack a substack of your Application stack.
3. Open the "rGridEngine" stack and click "Dictionary"
4. Click the button "Copy rGrid to Clipboard"
5. Paste the rGrid control into your Application stack.
6. Set the name of your new rGrid control to the name you want.
7. Save your Application stack.
Build your grid without writing code:
You can build your rGrid without writing any code by selecting cells and type or paste content into them.
Use a single click to select a cell and then directly type the text you would like to have in it.
Double click on existing text of a cell to select and edit the text.
You can also edit the "Column Headers" in the same way.
Navigate through the cells using the tab, return or arrow keys of your keyboard.
Copy content from cells using the cmd+c keyboard shortcut.
Cut content from cells using the cmd+x keyboard shortcut.
Paste content into cells using the cmd+v keyboard shortcut
Build your grid by script:
You can use the rGrid specific properties and commands in scripts to build your grid.
Use the "Dictionary" in the "rGridEngine" stack to see what rGrid specific properties, commands and messages are available.
For example you can set the value of a cell with the "value" property:
Code: Select all
set the rg["value of cell A1"] of grp "rGrid" to "My Cell"
Instead of the Spread Sheet style "A1" cell reference, you can also use the row index,the column index like this:
Code: Select all
set the rg["value of cell 1,1"] of grp "rGrid" to "My Cell"
rGrid can also use the native LiveCode object properties applicable for the type of object you are working with.
For example you can use the "htmlText" property to format the text in a cell. This will make the text bold:
Code: Select all
set the rg["htmlText of cell A1"] of grp "rGrid" to "<b>My Cell</b>"
The htmlText property can be used even without enclosing the text in html tags. It is recommended to use htmlText
for setting cell content. In the same way you can set the background color of a cell by using the "backColor" property:
Code: Select all
set the rg["backColor of cell A1"] of grp "rGrid" to "red"
The rGrid syntax even allows you to set property values for ranges of cells:
Code: Select all
set the rg["backColor of cell A1 to C1"] of grp "rGrid" to "red;blue;green"
Try the example buttons of the "Demo" section of the "rGridEngine" and Inspect their scripts to learn more.
Hope this gets you going!
With my best regards
Mats