widget data mapping Topic is solved
widget data mapping
Does wxWidgets have a way to map data directly to widgets? Qt has the QDataWidgetMapper class for this. See the link below for details:
http://doc.trolltech.com/qq/qq21-datawidgetmapper.html
http://doc.trolltech.com/qq/qq21-datawidgetmapper.html
Not quite. Validators are specifically for transfering data between variables and dialogs.mc2r wrote:is this what you are looking for?
What I am looking for is transferring data between data sources and widgets in general. I think what I am looking for is called "data binding" in the Microsoft universe.
wxWidgets has not buildin such a thing.entell wrote: What I am looking for is transferring data between data sources and widgets in general. I think what I am looking for is called "data binding" in the Microsoft universe.
Look at DataGrid in CodeDump, it allows you to bind a class to a wxGrid.
Currently I am working on the next version, trying to bin it to a generic DataHandler, which can be plugged in a source and many listeners for changes.
phlox
-
- Experienced Solver
- Posts: 50
- Joined: Sun Dec 05, 2004 2:44 am
wxWidgets certainly has something like this, virtual list controls. Just create a wxListCtrl with the wxLC_VIRTUAL flag and then you can hook it up with a huge amount of data virtually. Changed made to your data behind the scenes is reflected in the control.entell wrote:Not quite. Validators are specifically for transfering data between variables and dialogs.
What I am looking for is transferring data between data sources and widgets in general. I think what I am looking for is called "data binding" in the Microsoft universe.
It looks like wxListCtrl is the exception. None of the other widgets have this capability as far as I can tell.blizzymadden wrote:wxWidgets certainly has something like this, virtual list controls. Just create a wxListCtrl with the wxLC_VIRTUAL flag and then you can hook it up with a huge amount of data virtually. Changed made to your data behind the scenes is reflected in the control.
-
- Experienced Solver
- Posts: 50
- Joined: Sun Dec 05, 2004 2:44 am
That is true, only "tabular data" controls support virtual backends. Text controls can't do this. That's a limitation of the platforms, MSW's richedit control has no virtual interface, and neither does GTK's GtkTexView. GtkTexView has a buffer interface that you can get direct access to, but I don't know if I would consider it truly virtual. MAC's NSTextView just has set & get functions for its RTF content, I don't believe it has a virtual interface.phlox81 wrote:Yeah, but there is no functionality to bind f.e. a TextCtrl to a variable/value, or other controls.Belgabor wrote:That's not true. wxDataViewCtrl is built around this paradigm. I also believe wxGrid supports custom data backends.
Just curious, does QT have virtual text controls? If so, they must be using a custom control for this to work around this platform limitation.