Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/loops/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
-1在wxpython的wx.ListCtrl中表示什么_Python_Wxpython_Wxwidgets - Fatal编程技术网

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

-1在wxpython的wx.ListCtrl中表示什么,python,wxpython,wxwidgets,Python,Wxpython,Wxwidgets,有谁能帮助我知道-1在下面的代码行中表示什么吗 self.lst2 = wx.ListCtrl(self.right_panel, -1, style=wx.LC_LIST) self.lst1.InsertItem(0, '') 另外,(“”)在下面的代码行中表示什么 self.lst2 = wx.ListCtrl(self.right_panel, -1, style=wx.LC_LIST) self.lst1.InsertItem(0, '') @巴亚 关于第一个问题: 在该代码段

有谁能帮助我知道-1在下面的代码行中表示什么吗

self.lst2 = wx.ListCtrl(self.right_panel, -1, style=wx.LC_LIST)
self.lst1.InsertItem(0, '')
另外,(“”)在下面的代码行中表示什么

self.lst2 = wx.ListCtrl(self.right_panel, -1, style=wx.LC_LIST)
self.lst1.InsertItem(0, '')
@巴亚

关于第一个问题:

在该代码段中,
-1
是控件的ID

您可以分配自己的ID,但是-1意味着您可以让wxPython为您分配ID

关于第二个问题:

这意味着您正在向控件中插入空字符串

有关更多信息,请参阅。

@Bhagya

关于第一个问题:

在该代码段中,
-1
是控件的ID

您可以分配自己的ID,但是-1意味着您可以让wxPython为您分配ID

关于第二个问题:

这意味着您正在向控件中插入空字符串


有关更多信息,请参阅。

此问题似乎不在堆栈溢出主题中,请参阅,并且,-1=
wx.ID\u ANY
=
wx.NewIdRef()
=我不关心您给对象的ID是什么,只要确保它有一个ID即可
self.lst1.InsertItem(0',)
-在列表的第一个位置插入一个空格Ctrl。这个问题似乎不在堆栈溢出的主题中,请参阅,-1=
wx.ID\u ANY
=
wx.NewIdRef()
=我不管您给对象的ID是什么,只要确保它有一个ID即可
self.lst1.InsertItem(0')
-在listctrl的第一个位置插入一个空格。