Skip to content

Commit

Permalink
Doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jarvisteach committed Apr 20, 2017
1 parent 916687b commit 97d7ac3
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 5 deletions.
2 changes: 2 additions & 0 deletions docs/mkdocs/custom_united/nav.html
@@ -1,3 +1,5 @@
<div class="corner-ribbon"><a href="https://pypi.python.org/pypi/appJar/">Version 0.06 out now!</a></div>

<div class="navbar {% if config.extra.theme_inverse %}navbar-inverse{% else %}navbar-default{% endif %} navbar-fixed-top" role="navigation">
<div class="container">

Expand Down
19 changes: 19 additions & 0 deletions docs/mkdocs/docs/extra.css
@@ -0,0 +1,19 @@
@import url('http://fonts.googleapis.com/css?family=Noto+Sans:400,700');

.corner-ribbon{
width: 225px;
background: #ec0;
position: absolute;
text-align: center;
line-height: 50px;
letter-spacing: 1px;
color: #f0f0f0;
z-index: 20;
top: 88px;
right: -50px;
left: auto;
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
position: fixed;
box-shadow: 0 0 3px rgba(0,0,0,.3);
}
26 changes: 21 additions & 5 deletions docs/mkdocs/docs/pythonDevWidgets.md
Expand Up @@ -135,13 +135,21 @@ 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 +158,17 @@ 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
2 changes: 2 additions & 0 deletions examples/issues/issue151.py
Expand Up @@ -5,6 +5,8 @@
def press(*args):
if args[0]=="newRow":
app.addGridRow('airflow_data_raw', app.getGridEntries('airflow_data_raw'))
else:
print(args)

app=gui("GridTest", "800x500")

Expand Down

0 comments on commit 97d7ac3

Please sign in to comment.