I have a notebook and I am adding a new page with
self.pageIndex =0
def AddNewTestcase(self,page,title):
play_id = wx.Image(iAPTCommonLib.iAPTIcon.play,
wx.BITMAP_TYPE_PNG).ConvertToBitmap()
index = self.pageIndex
self.noteBook.InsertPage(index, page, title, 1, play_id)
self.pageIndex = self.pageIndex +1
return index
Once that page is created user will add some input..and after that I want to
remove the icon.
def RemoveIcon(self,index):
self.noteBook.SetPageBitmap(page_idx=index,bitmap=wx.EmptyBitmap(1,1))
It work most of the time but sometime it gives following error and
application abort:
Xlib: unexpected async reply (sequence 0x6cc8)
···
--
View this message in context: http://wxpython-users.1045709.n5.nabble.com/Application-abort-when-removing-the-icon-in-Notebook-Ctrl-tp5724039.html
Sent from the wxPython-users mailing list archive at Nabble.com.
Have you tried using wx.NullBitmap instead of wx.EmptyBitmap(1,1)?
···
On Thursday, April 16, 2015 at 2:02:58 PM UTC-4, LinuxnewBee wrote:
I have a notebook and I am adding a new page with
self.pageIndex =0
def AddNewTestcase(self,page,title):
play_id = wx.Image(iAPTCommonLib.iAPTIcon.play,
wx.BITMAP_TYPE_PNG).ConvertToBitmap()
index = self.pageIndex
self.noteBook.InsertPage(index, page, title, 1, play_id)
self.pageIndex = self.pageIndex +1
return index
Once that page is created user will add some input…and after that I want to
remove the icon.
def RemoveIcon(self,index):
self.noteBook.SetPageBitmap(page_idx=index,bitmap=wx.EmptyBitmap(1,1))
It work most of the time but sometime it gives following error and
application abort:
Xlib: unexpected async reply (sequence 0x6cc8)
–
View this message in context: http://wxpython-users.1045709.n5.nabble.com/Application-abort-when-removing-the-icon-in-Notebook-Ctrl-tp5724039.html
Sent from the wxPython-users mailing list archive at Nabble.com.
Using wx.NullBitmap is causing Segmentation fault
···
--
View this message in context: http://wxpython-users.1045709.n5.nabble.com/Application-abort-when-removing-the-icon-in-Notebook-Ctrl-tp5724039p5724068.html
Sent from the wxPython-users mailing list archive at Nabble.com.