简体   繁体   English

-1 在 wxpython 中的 wx.ListCtrl 中表示什么

[英]what does -1 indicate in wx.ListCtrl in wxpython

can anyone help me out knowing what does -1 indicate in following line of code?谁能帮助我知道 -1 在以下代码行中表示什么?

self.lst2 = wx.ListCtrl(self.right_panel, -1, style=wx.LC_LIST)

Also, what does ('') indicate in following line of code?另外,('')在以下代码行中表示什么?

self.lst1.InsertItem(0, '')

@Bhagya, @Bhagya,

For the first question:对于第一个问题:

In that code snippet -1 is the ID of the control.在该代码段中, -1是控件的 ID。

You can assign your own ID but -1 means that you let wxPython assign the ID for you.您可以分配自己的 ID,但 -1 表示您让 wxPython 为您分配 ID。

For the second question:对于第二个问题:

It means that you are inserting empty string into the control.这意味着您正在将空字符串插入控件。

See documentation for more info.有关更多信息,请参阅文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM