radio button display issue

I am creating multi-column lists which are all equal in length. I also generate radio buttons equal to the length of list. I have couple of issues:

1] Display issue: In fig1 (left), I get radio buttons. But when I scroll down this is what happens (Fig. 2 at right).

Following is a snippet of my code to generate it Please assist me to fix this issue so that I get full list of radio buttons displayed.

    w = 0

    for i in range(1,len(lut_code)):

        w += 30

        rb_G = wx.RadioButton(scroll1, -1, "G", (500,w), style=wx.RB_GROUP)

        rb_F = wx.RadioButton(scroll1, -1, "F", (540,w))

        rb_P = wx.RadioButton(scroll1, -1, "P", (580,w))

2] Selection of radio button: When I want to select a single radio button from a row, a complete row is selected instead and it gets blue in color. Is it because of my use of wx.ListCtrl to display these columns? What would be the fix or alternative method to only select radio button of choice instead of selecting whole row?

Please attach a demo .py file to your next post, so we can just open that file and see your problem directly. I can’t seem to find any info on ListCtrl supporting buttons at all, though one post mentions adding pics/icons that look like buttons and handling click events on the pics/icons.

···

On Friday, July 4, 2014 6:39:50 AM UTC-7, Ibraheem Khan wrote:

I am creating multi-column lists which are all equal in length. I also generate radio buttons equal to the length of list. I have couple of issues:

1] Display issue: In fig1 (left), I get radio buttons. But when I scroll down this is what happens (Fig. 2 at right).

Following is a snippet of my code to generate it Please assist me to fix this issue so that I get full list of radio buttons displayed.

    w = 0
    for i in range(1,len(lut_code)):
        w += 30
        rb_G = wx.RadioButton(scroll1, -1, "G", (500,w), style=wx.RB_GROUP)
        rb_F = wx.RadioButton(scroll1, -1, "F", (540,w))
        rb_P = wx.RadioButton(scroll1, -1, "P", (580,w))

2] Selection of radio button: When I want to select a single radio button from a row, a complete row is selected instead and it gets blue in color. Is it because of my use of wx.ListCtrl to display these columns? What would be the fix or alternative method to only select radio button of choice instead of selecting whole row?

I have attached code and text file from which I am reading data.

wx_hydr_con_mod_test.py (4.22 KB)

andlookupfair.txt (1.18 KB)

···

On Mon, Jul 7, 2014 at 2:45 PM, Nathan McCorkle nmz787@gmail.com wrote:

Please attach a demo .py file to your next post, so we can just open that file and see your problem directly. I can’t seem to find any info on ListCtrl supporting buttons at all, though one post mentions adding pics/icons that look like buttons and handling click events on the pics/icons.

On Friday, July 4, 2014 6:39:50 AM UTC-7, Ibraheem Khan wrote:

I am creating multi-column lists which are all equal in length. I also generate radio buttons equal to the length of list. I have couple of issues:

1] Display issue: In fig1 (left), I get radio buttons. But when I scroll down this is what happens (Fig. 2 at right).

Following is a snippet of my code to generate it Please assist me to fix this issue so that I get full list of radio buttons displayed.

    w = 0
    for i in range(1,len(lut_code)):
        w += 30
        rb_G = wx.RadioButton(scroll1, -1, "G", (500,w), style=wx.RB_GROUP)
        rb_F = wx.RadioButton(scroll1, -1, "F", (540,w))
        rb_P = wx.RadioButton(scroll1, -1, "P", (580,w))

2] Selection of radio button: When I want to select a single radio button from a row, a complete row is selected instead and it gets blue in color. Is it because of my use of wx.ListCtrl to display these columns? What would be the fix or alternative method to only select radio button of choice instead of selecting whole row?

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/nwSAKE0LOW4/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.

Ah, you’re adding the RadioButtons to scroll1 (a panel), rather than the ListCtrl. I believe ListCtrl doesn’t support buttons, as I mentioned. You might try UltimateListCtrl, check the wxPython demos here:
http://downloads.sourceforge.net/wxpython/wxPython-demo-3.0.0.0.tar.bz2

(this widget isn’t perfect though, like scrolling fast or page-up/page-down doesn’t render some rows for me)

I actually got frustrated at the lack of a good/easy to use widget to add buttons to rows and ended up making my own, sort of, using a gridsizer or flexgridsizer (just adding StaticText and Buttons/RadioButtons to each grid row).

You might check this out, it’s sort of a list with ability for RadioButtons:

http://wxpropgrid.sourceforge.net/cgi-bin/index

···

On Monday, July 7, 2014 1:37:11 PM UTC-7, Ibraheem Khan wrote:

I have attached code and text file from which I am reading data.

On Mon, Jul 7, 2014 at 2:45 PM, Nathan McCorkle nmz...@gmail.com wrote:

Please attach a demo .py file to your next post, so we can just open that file and see your problem directly. I can’t seem to find any info on ListCtrl supporting buttons at all, though one post mentions adding pics/icons that look like buttons and handling click events on the pics/icons.

On Friday, July 4, 2014 6:39:50 AM UTC-7, Ibraheem Khan wrote:

I am creating multi-column lists which are all equal in length. I also generate radio buttons equal to the length of list. I have couple of issues:

1] Display issue: In fig1 (left), I get radio buttons. But when I scroll down this is what happens (Fig. 2 at right).

Following is a snippet of my code to generate it Please assist me to fix this issue so that I get full list of radio buttons displayed.

    w = 0
    for i in range(1,len(lut_code)):
        w += 30
        rb_G = wx.RadioButton(scroll1, -1, "G", (500,w), style=wx.RB_GROUP)
        rb_F = wx.RadioButton(scroll1, -1, "F", (540,w))
        rb_P = wx.RadioButton(scroll1, -1, "P", (580,w))

2] Selection of radio button: When I want to select a single radio button from a row, a complete row is selected instead and it gets blue in color. Is it because of my use of wx.ListCtrl to display these columns? What would be the fix or alternative method to only select radio button of choice instead of selecting whole row?

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/nwSAKE0LOW4/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.

wxpropgrid is in the form of an executable. I need a *.py to see how it works. Please direct me to download link where I can find a sample/test code.py. Thanks!

···

On Mon, Jul 7, 2014 at 6:03 PM, Nathan McCorkle nmz787@gmail.com wrote:

Ah, you’re adding the RadioButtons to scroll1 (a panel), rather than the ListCtrl. I believe ListCtrl doesn’t support buttons, as I mentioned. You might try UltimateListCtrl, check the wxPython demos here:
http://downloads.sourceforge.net/wxpython/wxPython-demo-3.0.0.0.tar.bz2

(this widget isn’t perfect though, like scrolling fast or page-up/page-down doesn’t render some rows for me)

I actually got frustrated at the lack of a good/easy to use widget to add buttons to rows and ended up making my own, sort of, using a gridsizer or flexgridsizer (just adding StaticText and Buttons/RadioButtons to each grid row).

You might check this out, it’s sort of a list with ability for RadioButtons:

http://wxpropgrid.sourceforge.net/cgi-bin/index

On Monday, July 7, 2014 1:37:11 PM UTC-7, Ibraheem Khan wrote:

I have attached code and text file from which I am reading data.

On Mon, Jul 7, 2014 at 2:45 PM, Nathan McCorkle nmz...@gmail.com wrote:

Please attach a demo .py file to your next post, so we can just open that file and see your problem directly. I can’t seem to find any info on ListCtrl supporting buttons at all, though one post mentions adding pics/icons that look like buttons and handling click events on the pics/icons.

On Friday, July 4, 2014 6:39:50 AM UTC-7, Ibraheem Khan wrote:

I am creating multi-column lists which are all equal in length. I also generate radio buttons equal to the length of list. I have couple of issues:

1] Display issue: In fig1 (left), I get radio buttons. But when I scroll down this is what happens (Fig. 2 at right).

Following is a snippet of my code to generate it Please assist me to fix this issue so that I get full list of radio buttons displayed.

    w = 0
    for i in range(1,len(lut_code)):
        w += 30
        rb_G = wx.RadioButton(scroll1, -1, "G", (500,w), style=wx.RB_GROUP)
        rb_F = wx.RadioButton(scroll1, -1, "F", (540,w))
        rb_P = wx.RadioButton(scroll1, -1, "P", (580,w))

2] Selection of radio button: When I want to select a single radio button from a row, a complete row is selected instead and it gets blue in color. Is it because of my use of wx.ListCtrl to display these columns? What would be the fix or alternative method to only select radio button of choice instead of selecting whole row?

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/nwSAKE0LOW4/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/nwSAKE0LOW4/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.

Ibraheem Khan wrote:

wxpropgrid is in the form of an executable. I need a *.py to see how
it works. Please direct me to download link where I can find a
sample/test code.py.

Where on earth are you looking? When I go to that link and click
"Download", the major sections on the page are "Download Source Code"
and "wxPython Binaries and Sources".

···

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

See the demo tar.bz2 file… PropertyGrid.py is in the demo directory once unpacked

···

On Monday, July 7, 2014 3:16:28 PM UTC-7, Ibraheem Khan wrote:

wxpropgrid is in the form of an executable. I need a *.py to see how it works. Please direct me to download link where I can find a sample/test code.py. Thanks!

On Mon, Jul 7, 2014 at 6:03 PM, Nathan McCorkle nmz...@gmail.com wrote:

Ah, you’re adding the RadioButtons to scroll1 (a panel), rather than the ListCtrl. I believe ListCtrl doesn’t support buttons, as I mentioned. You might try UltimateListCtrl, check the wxPython demos here:
http://downloads.sourceforge.net/wxpython/wxPython-demo-3.0.0.0.tar.bz2

(this widget isn’t perfect though, like scrolling fast or page-up/page-down doesn’t render some rows for me)

I actually got frustrated at the lack of a good/easy to use widget to add buttons to rows and ended up making my own, sort of, using a gridsizer or flexgridsizer (just adding StaticText and Buttons/RadioButtons to each grid row).

You might check this out, it’s sort of a list with ability for RadioButtons:

http://wxpropgrid.sourceforge.net/cgi-bin/index

On Monday, July 7, 2014 1:37:11 PM UTC-7, Ibraheem Khan wrote:

I have attached code and text file from which I am reading data.

On Mon, Jul 7, 2014 at 2:45 PM, Nathan McCorkle nmz...@gmail.com wrote:

Please attach a demo .py file to your next post, so we can just open that file and see your problem directly. I can’t seem to find any info on ListCtrl supporting buttons at all, though one post mentions adding pics/icons that look like buttons and handling click events on the pics/icons.

On Friday, July 4, 2014 6:39:50 AM UTC-7, Ibraheem Khan wrote:

I am creating multi-column lists which are all equal in length. I also generate radio buttons equal to the length of list. I have couple of issues:

1] Display issue: In fig1 (left), I get radio buttons. But when I scroll down this is what happens (Fig. 2 at right).

Following is a snippet of my code to generate it Please assist me to fix this issue so that I get full list of radio buttons displayed.

    w = 0
    for i in range(1,len(lut_code)):
        w += 30
        rb_G = wx.RadioButton(scroll1, -1, "G", (500,w), style=wx.RB_GROUP)
        rb_F = wx.RadioButton(scroll1, -1, "F", (540,w))
        rb_P = wx.RadioButton(scroll1, -1, "P", (580,w))

2] Selection of radio button: When I want to select a single radio button from a row, a complete row is selected instead and it gets blue in color. Is it because of my use of wx.ListCtrl to display these columns? What would be the fix or alternative method to only select radio button of choice instead of selecting whole row?

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/nwSAKE0LOW4/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/nwSAKE0LOW4/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.