Comments (6)
The idea is to have an additional set of options for each property (with each property I mean each class of property but could also be extended to each single property in the grid).
When clicking on the box a context menu appear. The default menu has only the reset entry (the menu of the color property has also the inherited entry).
Every single property has a default value that can be set.
The color of the box is empty if the property value is equal to the property default value. Is dark grey when the value is different from the default one.
The reset entry in the context menu needs to reset the value to the default one.
from nana-extra.
Some nice features! They should be documented somewhere!
What is it called?
How does one add to the items to the context menu?
Is there an option to hide the boxes if they are not used?
from nana-extra.
Why not simply use a pop-up menu when user right clicks on the property? Most users are accustomed to that behaviour. It would be more economical with screen space.
( Motivation: my application is very complex with lots of graphs. It is used in operating theaters where space is at a premium ( so no huge monitors ) and the doctors prefer the graphs to be as large as possible so they can be read without moving away from the patient. The result is that the menus and any other widgets need to be as small as possible so as not to get in the way of the graphs. This all means that I am always looking for places where I can save a pixel or two! )
from nana-extra.
I understand and could be a nice feature choose between the box and the right click.
I'll add to the todo list but don't expect this feature soon.
Thanks
Ciao
from nana-extra.
Some unanswered questions from two days ago:
Documentation?
Name?
How to add items to the context menu?
Option to hide?
from nana-extra.
Hi,
sorry for the delay but in these days I'm very busy and the time for the hobbies is close to zero.
The name of the box is "interaction box". Inside the code is referred as ibox_
Unfortunately there's no docs and right now no way to hide it (hope to be able to work on this soon 7/10 days).
To add a new entry to the contect menu that popup clicking on the ibox check the implementation of pg_color class
void pg_color::create(window wd)
{
// ibox context menu
menu_.append_splitter();
// 2. Inherited
menu_.append("Inherited", [this](const nana::menu::item_proxy& ip)
{
pg_color::value(nana::to_string(color_, ip.checked()));
printf(ip.checked() ? "[X]\n" : "[ ]\n");
emit_event();
});
menu_.enabled(2, show_inherited_);
menu_.check_style(2, nana::menu::checks::highlight);
...
}
Ciao
from nana-extra.
Related Issues (10)
- Compile failure HOT 4
- BUG in PropertyGrid: The property value is ONLY updated when the user presses the ENTER key HOT 5
- Feature Request PropertyGrid: Vertical gap between properties HOT 2
- BUG PropertyGrid choice property set value fails HOT 1
- pgitem memory leak HOT 1
- PG: Uninitialized variable warning
- PropertyGrid feature request: nested categories. HOT 2
- Question: Collapsing a category
- PropertyGrid Question: Use of item_proxy::_m_pgitem() HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nana-extra.