listctrl question

What ctrl? You mean wx.TextCtrl()?

···

On Tue, May 6, 2008 at 10:03 PM, Nathan McBride nomb85@comcast.net wrote:

-----BEGIN PGP SIGNED MESSAGE-----

Hash: SHA1

Hey guys I’m just starting out with wxPython and was just wandering how

to add one of the stock wx.___ icons to the first column of my 3 column

ctrl?

Thanks for your help,

nate

-----BEGIN PGP SIGNATURE-----

Version: GnuPG v1.4.7 (GNU/Linux)

Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFIILmo/n+duykW6K8RAtdrAJ0aRIwaC3uK2e3fK454n52JRJE3fwCbBfrD

zgKkV5py+PUu70qbY19KHK8=

=d2Jx

-----END PGP SIGNATURE-----


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Oh, you’re refering to the wx.ListCtrl(). I didn’t pay attention to the subject line. My bad there. :slight_smile: The answer, however, is to use the built-in ID’s. You know… wx.ID_xx will create a corresponding stock icon for you. That’s all, my friend. :wink:

···

On Tue, May 6, 2008 at 10:12 PM, Nathan McBride nomb85@comcast.net wrote:

-----BEGIN PGP SIGNED MESSAGE-----

Hash: SHA1

Sorry I thought it would be seen in the subject line.

I am asking about the ListCtrl

Chester wrote:

What ctrl? You mean wx.TextCtrl()?

On Tue, May 6, 2008 at 10:03 PM, Nathan McBride nomb85@comcast.net wrote:

Hey guys I’m just starting out with wxPython and was just wandering how

to add one of the stock wx.___ icons to the first column of my 3 column

ctrl?

Thanks for your help,

nate


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users



wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

-----BEGIN PGP SIGNATURE-----

Version: GnuPG v1.4.7 (GNU/Linux)

Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFIILu1/n+duykW6K8RAt37AJ4yV38/D9NKBj+z0XRFEOwIEAtk1wCgmJDG

5Rlu3gh0bYHNRGtgldTWoyo=

=3kwq

-----END PGP SIGNATURE-----


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

This link is also helpful… http://docs.wxwidgets.org/trunk/page_stockitems.html Have fun there! :wink:

···

On Tue, May 6, 2008 at 10:49 PM, Chester wxpythoner@gmail.com wrote:

Oh, you’re refering to the wx.ListCtrl(). I didn’t pay attention to the subject line. My bad there. :slight_smile: The answer, however, is to use the built-in ID’s. You know… wx.ID_xx will create a corresponding stock icon for you. That’s all, my friend. :wink:

On Tue, May 6, 2008 at 10:12 PM, Nathan McBride nomb85@comcast.net wrote:

-----BEGIN PGP SIGNED MESSAGE-----

Hash: SHA1

Sorry I thought it would be seen in the subject line.

I am asking about the ListCtrl

Chester wrote:

What ctrl? You mean wx.TextCtrl()?

On Tue, May 6, 2008 at 10:03 PM, Nathan McBride nomb85@comcast.net wrote:

Hey guys I’m just starting out with wxPython and was just wandering how

to add one of the stock wx.___ icons to the first column of my 3 column

ctrl?

Thanks for your help,

nate


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users



wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

-----BEGIN PGP SIGNATURE-----

Version: GnuPG v1.4.7 (GNU/Linux)

Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFIILu1/n+duykW6K8RAt37AJ4yV38/D9NKBj+z0XRFEOwIEAtk1wCgmJDG

5Rlu3gh0bYHNRGtgldTWoyo=

=3kwq

-----END PGP SIGNATURE-----


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

That stock ID’s are in wxWidgets’ namespace. Please use the wxPython’s namespace, e.g. wx.ID_NO. Always put the dot after wx, so wx.ID_NO, wx.ID_YES, wx.ID_OK, etc.

What I ment to say is that you don’t need to use the InsertImageItem() method at all. Skip this step. Just use a built-in ID (like wx.ID_NO) when you are creating the listctrl item and the icon of that listctrl item will be automatically created. Isn’t that great?

···

On Tue, May 6, 2008 at 10:57 PM, Nathan McBride nomb85@comcast.net wrote:

-----BEGIN PGP SIGNED MESSAGE-----

Hash: SHA1

Ya I am trying to use the stock ids. I have this:

def add_container(self, value):

    list_count = self.container_list.GetItemCount()

    self.container_list.InsertImageItem(list_count, wxID_NO)

    self.container_list.SetStringItem(list_count, 1, value)

And I’m getting this:

self.container_list.InsertImageItem(list_count, wxID_NO)

NameError: global name ‘wxID_NO’ is not defined

Chester wrote:

This link is also helpful…

http://docs.wxwidgets.org/trunk/page_stockitems.html Have fun there! :wink:

On Tue, May 6, 2008 at 10:49 PM, Chester wxpythoner@gmail.com wrote:

Oh, you’re refering to the wx.ListCtrl(). I didn’t pay attention to the

subject line. My bad there. :slight_smile: The answer, however, is to use the

built-in

ID’s. You know… wx.ID_xx will create a corresponding stock icon for you.

That’s all, my friend. :wink:

On Tue, May 6, 2008 at 10:12 PM, Nathan McBride nomb85@comcast.net > > >> wrote:

Sorry I thought it would be seen in the subject line.

I am asking about the ListCtrl

Chester wrote:

What ctrl? You mean wx.TextCtrl()?

On Tue, May 6, 2008 at 10:03 PM, Nathan McBride nomb85@comcast.net > > > wrote:

Hey guys I’m just starting out with wxPython and was just wandering

how

to add one of the stock wx.___ icons to the first column of my 3

column

ctrl?

Thanks for your help,

nate


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users



wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users



wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

-----BEGIN PGP SIGNATURE-----

Version: GnuPG v1.4.7 (GNU/Linux)

Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFIIMY7/n+duykW6K8RAuvBAKDT5EqqYAmoIulP+T/Z6MkslNwIqgCfW3re

wLR74JZ8aRAMlOT6k5ng2dg=

=o4Rc

-----END PGP SIGNATURE-----


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Ok so I did this:

self.container_list.SetStringItem(list_count, 1, "test", wx.ID_NO)

also taking out the other one and still nothing?

Chester wrote:

That stock ID's are in wxWidgets' namespace. Please use the wxPython's
namespace, e.g. wx.ID_NO. Always put the dot after wx, so wx.ID_NO,
wx.ID_YES, wx.ID_OK, etc.

What I ment to say is that you don't need to use the InsertImageItem()
method at all. Skip this step. Just use a built-in ID (like wx.ID_NO) when
you are creating the listctrl item and the icon of that listctrl item will
be automatically created. Isn't that great?

Ya I am trying to use the stock ids. I have this:

def add_container(self, value):
       list_count = self.container_list.GetItemCount()
       self.container_list.InsertImageItem(list_count, wxID_NO)
       self.container_list.SetStringItem(list_count, 1, value)

And I'm getting this:

   self.container_list.InsertImageItem(list_count, wxID_NO)
NameError: global name 'wxID_NO' is not defined

Chester wrote:
>>> This link is also helpful...
>>> wxWidgets: Stock Items Have fun there!
:wink:
>>>
>>>
>>>> Oh, you're refering to the wx.ListCtrl(). I didn't pay attention

to the

···

On Tue, May 6, 2008 at 10:57 PM, Nathan McBride <nomb85@comcast.net> wrote:
>>> On Tue, May 6, 2008 at 10:49 PM, Chester <wxpythoner@gmail.com> wrote:
>>>> subject line. My bad there. :slight_smile: The answer, however, is to use the
built-in
>>>> ID's. You know... wx.ID_xx will create a corresponding stock icon for
you.
>>>> That's all, my friend. :wink:
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, May 6, 2008 at 10:12 PM, Nathan McBride <nomb85@comcast.net> > >>>> wrote:
>>>>
>>> Sorry I thought it would be seen in the subject line.
>>> I am asking about the ListCtrl
>>>
>>> Chester wrote:
>>>>>>> What ctrl? You mean wx.TextCtrl()?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Tue, May 6, 2008 at 10:03 PM, Nathan McBride <nomb85@comcast.net > >>> wrote:
>>>>>>> Hey guys I'm just starting out with wxPython and was just wandering
>>> how
>>>>>>> to add one of the stock wx.___ icons to the first column of my 3
>>> column
>>>>>>> ctrl?
>>>>>>> Thanks for your help,
>>>>>>>
>>>>>>> nate
>>> _______________________________________________
>>> wxpython-users mailing list
>>> wxpython-users@lists.wxwidgets.org
>>> http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
>>>>>>> -------------------------
>>>>>>> _______________________________________________
>>>>>>> wxpython-users mailing list
>>>>>>> wxpython-users@lists.wxwidgets.org
>>>>>>> http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
>>> -------------------------
>>> _______________________________________________
>>> wxpython-users mailing list
>>> wxpython-users@lists.wxwidgets.org
>>> http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

-------------------------

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Hash: SHA1

I’m trying to be able to have each entry of the list control have its
own image?

I don’t think this is correct for me?

Chester wrote:

wx.ListCtrl(self, parent, id, pos,
size, style, validator, name)

<— this is the signature

for the ‘id’ argument, use wx.ID_NO

Ok so I did this:

self.container_list.SetStringItem(list_count, 1, “test”, wx.ID_NO)

also taking out the other one and still nothing?

Chester wrote:

That stock ID’s are in wxWidgets’ namespace. Please
use the wxPython’s
namespace, e.g. wx.ID_NO. Always put the dot after
wx, so wx.ID_NO,
wx.ID_YES, wx.ID_OK, etc.

What I ment to say is that you don’t need to use the
InsertImageItem()
method at all. Skip this step. Just use a built-in ID
(like wx.ID_NO) when
you are creating the listctrl item and the icon of
that listctrl item will
be automatically created. Isn’t that great?

Ya I am trying to use the stock ids. I have this:

def add_container(self, value):
list_count = self.container_list.GetItemCount()

self.container_list.InsertImageItem(list_count, wxID_NO)

   self.container_list.SetStringItem(list_count,

1, value)

And I’m getting this:

self.container_list.InsertImageItem(list_count,
wxID_NO)
NameError: global name ‘wxID_NO’ is not defined

Chester wrote:

This link is also helpful…

Have fun there!

:wink:

Oh, you’re refering to the
wx.ListCtrl(). I didn’t pay attention
to the
subject line. My bad there. :slight_smile: The
answer, however, is to use the
built-in
ID’s. You know… wx.ID_xx will
create a corresponding stock icon for
you.
That’s all, my friend. :wink:

Sorry I thought it would be seen in the
subject line.
I am asking about the ListCtrl

Chester wrote:

What ctrl? You mean
wx.TextCtrl()?

Hey guys I’m just
starting out with wxPython and was just wandering
how
to add one of the stock
wx.___ icons to the first column of my 3

···

nomb85@comcast.net

nomb85@comcast.net

http://docs.wxwidgets.org/trunk/page_stockitems.html

wxpythoner@gmail.com

nomb85@comcast.net

nomb85@comcast.net

wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

http://enigmail.mozdev.org