python ObjectListView 有一个不可编辑的列
我有一个可以使用
self.TrackOlv.cellEditMode = ObjectListView.CELLEDIT_SINGLECLICK
进行编辑的 ObjectListView这给了我两个奇怪的问题。
1)我无法编辑第一个单元格/列。这是因为 OLV 将其视为主键还是有类似效果?我认为我可以通过为我的对象创建另一个属性然后不显示它来解决它,但这看起来有点俗气。
2)我的第一列的第一个字符之前有大约 4 个字符的空白。这是正常的吗?这包括标准的蓝/黄线颜色效果。我有空白,然后列文本和颜色效果将开始。没什么大不了的,只是想知道是否正常。
I have a ObjectListView that I have made editable with
self.TrackOlv.cellEditMode = ObjectListView.CELLEDIT_SINGLECLICK
The gives me 2 odd issues.
1) I can't edit the first cell/column. Is this due to OLV treating it like a primary key or something to that effect? I assume I can get around it by creating another attribute to my object and then just not displaying it, but that seems kind of cheesy.
2) I have about 4 chars worth of white space before the first char of my first column. Is this normal? This includes the standard blue/yellow line color effect. I have the white space, then the column text and color effect will begin. Its not a big deal, just wonder if its normal.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
1.) 对于每一列,您是否添加了 isEditable=True?
这在我的 OLV 中非常适合我,并且具有:
2.)您可以阅读为什么会出现这种情况 此处。基本上,如果不需要排序,就可以摆脱这个间隙。
1.) For each column have you added isEditable=True?
This works perfectly for me in my OLV, along with having;
2.) You can read why this is the case here. Basically, if you don't need sorting, you can get rid of this gap.