Chat-like Widget

Is there any way to achieve this?
http://img410.imageshack.us/img410/1051/chataprovado.jpg

Mike Driscoll kindly suggested using transparent RichTextCtrl over a
backgrounded panel.

Does anybody has already made a solution for this?
Bear in mind the text should be selectable/copied and images inserted,
like any other chat window.

Thanks in advance.

Is there any way to achieve this?
ImageShack - Best place for all of your image hosting and image sharing needs

Mike Driscoll kindly suggested using transparent RichTextCtrl over a
backgrounded panel.

Will that work, Mike? (or others?). I was under the impression that
the backgrounds (or a DC-drawn on gradient) will not just shine through,
at least on Windows. I wish it were so, because then working with
gradient backgrounds would be so much better with wxPython.

Does anybody has already made a solution for this?
Bear in mind the text should be selectable/copied and images inserted,
like any other chat window.

Offhand, I can't think of any *easy* way to do this if you definitely want to
keep the gradient or image background.

Maybe one way would be to draw the gradient or image, and then put
RichTextCtrls, one per line, with no border, at positions where you want the
chat words to be, but calculate the average color of the gradient at that
position, and then make the RichTextCtrl's background have that color. It
would not match perfectly, but might be hard to notice the difference.
(Could this be what Mike had in mind?) Because it is a RichTextCtrl,
you could put images inline with the text.

Che

···

On Fri, Sep 25, 2009 at 12:44 PM, Gabriel Andrade <gabiruh@gmail.com> wrote:

Is there any way to achieve this?

http://img410.imageshack.us/img410/1051/chataprovado.jpg

Mike Driscoll kindly suggested using transparent RichTextCtrl over a

backgrounded panel.

Will that work, Mike? (or others?). I was under the impression that

the backgrounds (or a DC-drawn on gradient) will not just shine through,

at least on Windows. I wish it were so, because then working with

gradient backgrounds would be so much better with wxPython.

I have no idea…I was just throwing out ideas for him to try…

Does anybody has already made a solution for this?

Bear in mind the text should be selectable/copied and images inserted,

like any other chat window.

Offhand, I can’t think of any easy way to do this if you definitely want to

keep the gradient or image background.

Maybe one way would be to draw the gradient or image, and then put

RichTextCtrls, one per line, with no border, at positions where you want the

chat words to be, but calculate the average color of the gradient at that

position, and then make the RichTextCtrl’s background have that color. It

would not match perfectly, but might be hard to notice the difference.

(Could this be what Mike had in mind?) Because it is a RichTextCtrl,

you could put images inline with the text.

Che

I was just brainstorming with the OP on the wxPython IRC. I don’t think wxPython has this kind of functionality built into it. I thought one might be able to use some kind of html control too, but I’m not sure how that would work.

···

On Fri, Sep 25, 2009 at 1:03 PM, C M cmpython@gmail.com wrote:

On Fri, Sep 25, 2009 at 12:44 PM, Gabriel Andrade gabiruh@gmail.com wrote:


Mike Driscoll

Blog: http://blog.pythonlibrary.org