I can transfer data from this node (parsed with ElementTree) to a
panel using a validator and back again. It works fine for the name and
id, but the "job" child is proving harder to solve.
The job child can be repeated for multiple terms (Summer, Fall,
Winter, Spring) and there can be two jobs for the same term (but with
different name attributes) as in the example above.
What is the best widget to display this kind of flexible information?
I thought about a ListCtrl, and I also have tried a Choice that lists
the available jobs for each term that dynamically fills the Pay and
Award fields as necessary, but I'm not sure how to transfer the data
from these fields to the node when the data in the fields is changed.
What is the best widget to display this kind of flexible information?
I thought about a ListCtrl, and I also have tried a Choice that lists
A ListCtrl probably makes the most sense, depending on the needs of your UI.
the available jobs for each term that dynamically fills the Pay and
Award fields as necessary, but I'm not sure how to transfer the data
from these fields to the node when the data in the fields is changed.
Any suggestions?
I'm not sure I understand the problem. Wouldn't you just do the opposite of when you put the values into the widgets? IOW, instead of reading values you write to and/or create new nodes as needed.
I think a ListCtrl does make the most sense, but building one that can
be dynamically edited will take some work. I'd also need to create a
choice editor for certain columns, I think, and I couldn't make that
work with UltimateListCtrl, so I'm not sure how I'd make it work with
a straight wx.ListCtrl.
As for the problem: In the XML there are any number of job nodes. Not
a set one, two, or three, but it could be more than that. Every job
node has two child nodes. So, I figured if I make a list of all the
jobs that match the quarter and year, and put the names into a
wx.Choice, selecting a job there will fill in the two values in the
two TextCtrls. Changing the values of those text controls has to then
manually change the contents of the node, because Validators can't do
the job at that point: Selecting another job changes the values in the
fields.
I'm still lost in this code.
···
On Sat, Jun 18, 2011 at 12:14 PM, Robin Dunn <robin@alldunn.com> wrote:
On 6/17/11 3:50 PM, Josh English wrote:
What is the best widget to display this kind of flexible information?
I thought about a ListCtrl, and I also have tried a Choice that lists
A ListCtrl probably makes the most sense, depending on the needs of your UI.
the available jobs for each term that dynamically fills the Pay and
Award fields as necessary, but I'm not sure how to transfer the data
from these fields to the node when the data in the fields is changed.
Any suggestions?
I'm not sure I understand the problem. Wouldn't you just do the opposite of
when you put the values into the widgets? IOW, instead of reading values
you write to and/or create new nodes as needed.
however, a grid may work for my solution of custom editors. I haven't
worked with one before, though.
Either that, or I will have to continue to play with the mixin class
for the Editable List Ctrl and use different editors depending on the
column.
Josh
···
On Mon, Jun 20, 2011 at 9:17 PM, Josh English <joshua.r.english@gmail.com> wrote:
I think a ListCtrl does make the most sense, but building one that can
be dynamically edited will take some work. I'd also need to create a
choice editor for certain columns, I think, and I couldn't make that
work with UltimateListCtrl, so I'm not sure how I'd make it work with
a straight wx.ListCtrl.
As for the problem: In the XML there are any number of job nodes. Not
a set one, two, or three, but it could be more than that. Every job
node has two child nodes. So, I figured if I make a list of all the
jobs that match the quarter and year, and put the names into a
wx.Choice, selecting a job there will fill in the two values in the
two TextCtrls. Changing the values of those text controls has to then
manually change the contents of the node, because Validators can't do
the job at that point: Selecting another job changes the values in the
fields.
I'm still lost in this code.
On Sat, Jun 18, 2011 at 12:14 PM, Robin Dunn <robin@alldunn.com> wrote:
On 6/17/11 3:50 PM, Josh English wrote:
What is the best widget to display this kind of flexible information?
I thought about a ListCtrl, and I also have tried a Choice that lists
A ListCtrl probably makes the most sense, depending on the needs of your UI.
the available jobs for each term that dynamically fills the Pay and
Award fields as necessary, but I'm not sure how to transfer the data
from these fields to the node when the data in the fields is changed.
Any suggestions?
I'm not sure I understand the problem. Wouldn't you just do the opposite of
when you put the values into the widgets? IOW, instead of reading values
you write to and/or create new nodes as needed.