Hello,
I'm trying to use StyledTextCtrl_MarkerDefineRGBAImage function,
but I can't find out how the image must be passed.
From scintilla documention I get that it is supposed to be
SCI_MARKERDEFINERGBAIMAGE(int markerNumber, const char *pixels)
so I thought it should work by providing a string
img = '\x00\x00\x00\x00'
editor.RGBAImageSetWidth(14)
editor.MarkerDefineRGBAImage(0,img)
then I tried passing a list
img = [0,0,0,0]
editor.MarkerDefineRGBAImage(0,img)
and finally I tried using ctypes with byte and ubyte
import ctypes
img = ctypes.c_ubyte*4
img.from_buffer_copy('\x00\x00\x00\x00')
<c_ubyte_Array_4 object at 0x7f9902a5c9e0>
for i in img():
print i
0
0
0
0
editor.MarkerDefineRGBAImage(0,img())
editor.MarkerDefineRGBAImage(0,ctypes.byref(img()))
editor.MarkerDefineRGBAImage(0,ctypes.pointer(img()))
but all returned the same error
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/stc.py", line 6371,
in MarkerDefineRGBAImage
return _stc.StyledTextCtrl_MarkerDefineRGBAImage(*args, **kwargs)
*TypeError: in method 'StyledTextCtrl_MarkerDefineRGBAImage', expected
argument 3 of type 'unsigned char const *'*
So, how do I provide a 'unsigned char const *'?
Thank you
Claudia
--
You received this message because you are subscribed to the Google Groups "wxPython-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.