I have a table displayed below within a dialog box with several options on right – I want to re-create it using wxpython within ArcGIS pythonaddins framework. First item is to display table within a dialog box with scroll down option. Second thing is to change “Cond.” column based on any choice from “Update” column – like for example, If I click on ‘G’ then “Cond.” will change to ‘Good’ and will subsequently change ‘A’, ‘B’, ‘C’, and ‘D’ values (this is what I mean by interactive). Finally I want to write this modified table to a text file. I can create a dialog box but displaying table with interactive functionality is beyond my ken. Any suggestions would be highly appreciative.
I would call that an unexpected user interface. There’s no way I
would expect that the letters G F and P are actually active links.
If it were me, I would use a three-item radio button there. That
would eliminate the need for the “Cond.” column as well, because you
could see visually which item was selected.
···
Ibraheem Khan wrote:
I
have a table displayed below within a dialog box with
several options on right – I want to re-create it using
wxpython within ArcGIS pythonaddins framework. First item is
to display table within a dialog box with scroll down
option. Second thing is to change “Cond.” column based on
any choice from “Update” column – like for example, If I
click on ‘G’ then “Cond.” will change to ‘Good’ and will
subsequently change ‘A’, ‘B’, ‘C’, and ‘D’ values (this is
what I mean by interactive). Finally I want to write this
modified table to a text file. I can create a dialog box but
displaying table with interactive functionality is beyond my
ken. Any suggestions would be highly appreciative.
-- Tim Roberts, Providenza & Boekelheide, Inc.
Download the wxPython-demos and look in the agw folder at ultimatelistctrl (UltimateReportDemo.py)… I think the demo has checkboxes or radio buttons, not sure if it shows how to catch events from clicking them though.
http://downloads.sourceforge.net/wxpython/wxPython-demo-3.0.0.0.tar.bz2
Unfortunately the basic ListCtrl doesn’t seem to handle columns, though there might be a way to figure out what column a mouse click came on top of some how… but it would be some math (get cursor position, figure out the position of stuff in the row, figure out what thing matched with the cursor position)
···
On Wednesday, June 11, 2014 11:13:24 PM UTC-7, Ibraheem Khan wrote:
I have a table displayed below within a dialog box with several options on right – I want to re-create it using wxpython within ArcGIS pythonaddins framework. First item is to display table within a dialog box with scroll down option. Second thing is to change “Cond.” column based on any choice from “Update” column – like for example, If I click on ‘G’ then “Cond.” will change to ‘Good’ and will subsequently change ‘A’, ‘B’, ‘C’, and ‘D’ values (this is what I mean by interactive). Finally I want to write this modified table to a text file. I can create a dialog box but displaying table with interactive functionality is beyond my ken. Any suggestions would be highly appreciative.
Thanks.
wxPython-demos gave me a good start. I have found very useful wx.ListCtrl examples. One thing that I am still trying to figure out is the way to read a text file and display using wx.ListCtrl. Any thoughts on it?
···
On Thu, Jun 12, 2014 at 1:56 PM, Nathan McCorkle nmz787@gmail.com wrote:
Download the wxPython-demos and look in the agw folder at ultimatelistctrl (UltimateReportDemo.py)… I think the demo has checkboxes or radio buttons, not sure if it shows how to catch events from clicking them though.
http://downloads.sourceforge.net/wxpython/wxPython-demo-3.0.0.0.tar.bz2
Unfortunately the basic ListCtrl doesn’t seem to handle columns, though there might be a way to figure out what column a mouse click came on top of some how… but it would be some math (get cursor position, figure out the position of stuff in the row, figure out what thing matched with the cursor position)
On Wednesday, June 11, 2014 11:13:24 PM UTC-7, Ibraheem Khan wrote:
I have a table displayed below within a dialog box with several options on right – I want to re-create it using wxpython within ArcGIS pythonaddins framework. First item is to display table within a dialog box with scroll down option. Second thing is to change “Cond.” column based on any choice from “Update” column – like for example, If I click on ‘G’ then “Cond.” will change to ‘Good’ and will subsequently change ‘A’, ‘B’, ‘C’, and ‘D’ values (this is what I mean by interactive). Finally I want to write this modified table to a text file. I can create a dialog box but displaying table with interactive functionality is beyond my ken. Any suggestions would be highly appreciative.
–
You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxpython-users/-B9ddR59QDs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I would read the file line by line, parsing each line into the proper “columns” and then calling the ListCtrl’s InsertStringItem method (or whichever insert method you want) for each column.
I think that’s probably the easiest way and one I’ve used successfully in the past. I personally like to use ObjectListView though. I think it’s easier to use and manage data with.
Mike
Just watch out and make sure the widget has all the features you’ll eventually want to add. Several times now I’ve implemented a widget, found it lacked some functionality I assumed it had, then switched to a similar widget only to find the API was not the same and I had to re-code a lot.
···
On Thursday, June 12, 2014 5:01:22 PM UTC-7, Ibraheem Khan wrote:
Thanks.
wxPython-demos gave me a good start. I have found very useful wx.ListCtrl examples. One thing that I am still trying to figure out is the way to read a text file and display using wx.ListCtrl. Any thoughts on it?
On Thu, Jun 12, 2014 at 1:56 PM, Nathan McCorkle nmz...@gmail.com wrote:
Download the wxPython-demos and look in the agw folder at ultimatelistctrl (UltimateReportDemo.py)… I think the demo has checkboxes or radio buttons, not sure if it shows how to catch events from clicking them though.
http://downloads.sourceforge.net/wxpython/wxPython-demo-3.0.0.0.tar.bz2
Unfortunately the basic ListCtrl doesn’t seem to handle columns, though there might be a way to figure out what column a mouse click came on top of some how… but it would be some math (get cursor position, figure out the position of stuff in the row, figure out what thing matched with the cursor position)
On Wednesday, June 11, 2014 11:13:24 PM UTC-7, Ibraheem Khan wrote:
I have a table displayed below within a dialog box with several options on right – I want to re-create it using wxpython within ArcGIS pythonaddins framework. First item is to display table within a dialog box with scroll down option. Second thing is to change “Cond.” column based on any choice from “Update” column – like for example, If I click on ‘G’ then “Cond.” will change to ‘Good’ and will subsequently change ‘A’, ‘B’, ‘C’, and ‘D’ values (this is what I mean by interactive). Finally I want to write this modified table to a text file. I can create a dialog box but displaying table with interactive functionality is beyond my ken. Any suggestions would be highly appreciative.
–
You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxpython-users/-B9ddR59QDs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wxpython-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Very helpful suggestions. Thanks everyone.
···
On Fri, Jun 13, 2014 at 4:38 PM, Nathan McCorkle nmz787@gmail.com wrote:
Just watch out and make sure the widget has all the features you’ll eventually want to add. Several times now I’ve implemented a widget, found it lacked some functionality I assumed it had, then switched to a similar widget only to find the API was not the same and I had to re-code a lot.
On Thursday, June 12, 2014 5:01:22 PM UTC-7, Ibraheem Khan wrote:
Thanks.
wxPython-demos gave me a good start. I have found very useful wx.ListCtrl examples. One thing that I am still trying to figure out is the way to read a text file and display using wx.ListCtrl. Any thoughts on it?
On Thu, Jun 12, 2014 at 1:56 PM, Nathan McCorkle nmz...@gmail.com wrote:
Download the wxPython-demos and look in the agw folder at ultimatelistctrl (UltimateReportDemo.py)… I think the demo has checkboxes or radio buttons, not sure if it shows how to catch events from clicking them though.
http://downloads.sourceforge.net/wxpython/wxPython-demo-3.0.0.0.tar.bz2
Unfortunately the basic ListCtrl doesn’t seem to handle columns, though there might be a way to figure out what column a mouse click came on top of some how… but it would be some math (get cursor position, figure out the position of stuff in the row, figure out what thing matched with the cursor position)
On Wednesday, June 11, 2014 11:13:24 PM UTC-7, Ibraheem Khan wrote:
I have a table displayed below within a dialog box with several options on right – I want to re-create it using wxpython within ArcGIS pythonaddins framework. First item is to display table within a dialog box with scroll down option. Second thing is to change “Cond.” column based on any choice from “Update” column – like for example, If I click on ‘G’ then “Cond.” will change to ‘Good’ and will subsequently change ‘A’, ‘B’, ‘C’, and ‘D’ values (this is what I mean by interactive). Finally I want to write this modified table to a text file. I can create a dialog box but displaying table with interactive functionality is beyond my ken. Any suggestions would be highly appreciative.
–
You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxpython-users/-B9ddR59QDs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wxpython-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
–
You received this message because you are subscribed to a topic in the Google Groups “wxPython-users” group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wxpython-users/-B9ddR59QDs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.