Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] What's the way to get a dynamic "spreadsheet" like view #526

Open
Kochise opened this issue May 11, 2023 · 4 comments
Open

[DOC] What's the way to get a dynamic "spreadsheet" like view #526

Kochise opened this issue May 11, 2023 · 4 comments

Comments

@Kochise
Copy link

Kochise commented May 11, 2023

I'd like to have a kinda row/column view and populate each cell with graphical and interactive elements, not just text.

Ideally it would have a top search field for each column, pretty much like in https://github.com/frmdstryr/smd-search

Have you an idea to start with ? Maybe something in https://github.com/nucleic/enaml/tree/main/examples/dynamic

Regards.

@MatthieuDartiailh
Copy link
Member

Do you simply need a grid generated on the fly or do you also want the column width/row height adjustment one would expect from a spreadsheet ?

@Kochise
Copy link
Author

Kochise commented May 11, 2023

Hi, grid generated "on the fly" with row's height depending on cells' content.

No need for manual adjustment.

Typical "mock-up" would be a "3 columns" approach :

| Scene      (add) [search] | ZigBee     (add) [search] | Bluetooth  (add) [search] |
| ------------------------- | ------------------------- | ------------------------- |
| Precommissioned           | Toto                      | Titi                      |
| ------------------------- | ------------------------- | ------------------------- |
| Machine 1 (scan)          | (2/100, bandwidth %)      | (0/16)                    |
|                           | [Tata] (rssi)             |                           |
|                           |  +- Attribute             |                           |
|                           |  '- Method                |                           |
|                           | 0xE2200000 (drag'n drop)  |                           |
| ------------------------- | ------------------------- | ------------------------- |
| Machine 2 (scan)          |                           |                           |
| ------------------------- | ------------------------- | ------------------------- |

First row ("Precommissioned") is fixed, but following rows ("Machine X") are dynamic, upon clicking on "Scene (add)" button.

Then the columns' content might differ regarding the paired devices.

Content may include current status, picture of the device, tree-view of the Attributes/Methods, etc.

Hence keeping track of the UI content with the associated data have to be performed as well.

Regards.

@MatthieuDartiailh
Copy link
Member

I do not have the time to spin a full example but overriding layout_constaints like it is done in examples/layout/advanced/override_layout_constraints.enaml should get you what you are looking for.

@Kochise
Copy link
Author

Kochise commented May 15, 2023

Ok, will try that, thank for the hint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants