Skip to content

Commit

Permalink
Merge branch 'appJar' of github.com:jarvisteach/appJar into appJar
Browse files Browse the repository at this point in the history
  • Loading branch information
jarvisteach committed May 28, 2017
2 parents 6dceac0 + 415240e commit 3f5af36
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
29 changes: 24 additions & 5 deletions docs/mkdocs/docs/pythonDevWidgets.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,22 @@ It is possible to include buttons at the end of each row, and an additional row

* `.addGrid(title, data, action=None, addRow=False)`
Receives a (jagged) 2D list of values. The first list should be the headers for the grid, the rest will contain each row of values.
If action is set, a button will be created, at the end of each row, calling the specified function.
If addRow is True, then an additional row will appear at the end, with entry boxes and an additional button.

If `action` is set, a button will be created, at the end of each row, calling the specified function.
If `addRow` is True, then an additional row will appear at the end, with entry boxes and an additional button.

The **Press** button at the end of each data row will pass the values of that row to the function as a list.
The **Press** button at the end of the entry row will call the function, passing its name as a parameter.

NB. you shouldn't set `addRow` to be True, unless `action` has been set with a function.


####Get Grids

* `.getGridEntries(title)`
Get the contents of the entry boxes, if present.
Returned as a list, in the same order as the entry boxes.
If `addRow` was set when the *Grid* was created, this function will get the contents of the entry boxes.
They will be returned as a list, in the same order as the entry boxes.

* `.getGridSelectedCells(title)`
Gets a dictionary of booleans, indicating the status of each cell.
True indicates the cell is selected, False indicates the cell is not selected.
Expand All @@ -150,9 +159,19 @@ It is possible to include buttons at the end of each row, and an additional row
####Set Grids

* `.addGridRow(title, data)`
Add a single row of data to the existing grid.
Adds a new row of data to the end of the existing grid.
It will be positioned at the bottom of the grid, above the entry boxes if present.

To have the **Press** button on the entries row add a new row of data, try the following:

```python
def press(btn):
if btn == "Press": # the button on the entries row
data = app.getGridEntries("g1")
app.addGridRow("g1", data)
```


###MatPlotLib
---

Expand Down
3 changes: 2 additions & 1 deletion docs/mkdocs/docs/pythonDnD.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ There is a beta version of drag and drop between labels.

##Drag'n Drop Between Applications
---
There is also a beta version of drag and drop between applications - at the moment, this is has been seen to work on Mac OSX and Windows 7 - let us know of success on other versions of Windows!
There is also a beta version of drag and drop between applications - at the moment, this has been seen to work on Mac OSX, Raspberry Pi, and Windows 7 - let us know of success on other versions of Windows!

Certain widgets can be registered to receive *Drop* events:

Expand All @@ -26,6 +26,7 @@ Certain widgets can be registered to receive *Drop* events:
* `.setLabelDropTarget(title, function=None, replace=True)`

Then, if you drag a file or a URI onto one of these widgets, the filename/URI will be copied.
Or, if it's an image, the image will be replaced.

If no function has been set, the contents of the widget will be replaced with the filename/URI.
If you'd rather append the URI/filename - set `replace` to be False.
Expand Down
2 changes: 1 addition & 1 deletion docs/mkdocs/docs/pythonWidgets.md
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ app.go()
* `.clearListBox(title)`
Removes all items from the specified ListBox.

* `.setListBoxRows(title)`
* `.setListBoxRows(title, rows)`
Sets how many rows to display in the specified ListBox.

* `.setListBoxMulti(list, multi=True)`
Expand Down

0 comments on commit 3f5af36

Please sign in to comment.