Text as image it displays on frame but not on styled frame

Marcos del Amo wrote:

Hello again, I've been exploring the demo for a few days, and I
finally found what I needed, in the DragImage example makes some Text
on top of some background.
First of all I created some frame to get rid of the import run, and
import images, and it works great, but when I give some style to the
Frame the Text stops being displayed correctly.
Could anyone explain to me what I'm doing wrong?

When you specify the "style" parameter, you are not modifying the
current set of styles. Instead, you are completely replacing all of the
styles that would ordinarily be created. That's why, for example, your
"stay on top" window lacks a title bar, a border, and all of the
standard window controls.

If you change wx.STAY_ON_TOP to wx.DEFAULT_FRAME_STYLE|wx.STAY_ON_TOP,
your example works.

···

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

I didn’t know that, I fixed it by adding a sizer, and using self.Layout() and self.Show().

Thanks for the answer

···

El miércoles, 17 de febrero de 2016, 21:06:23 (UTC+1), Tim Roberts escribió:

Marcos del Amo wrote:

Hello again, I’ve been exploring the demo for a few days, and I

finally found what I needed, in the DragImage example makes some Text

on top of some background.

First of all I created some frame to get rid of the import run, and

import images, and it works great, but when I give some style to the

Frame the Text stops being displayed correctly.

Could anyone explain to me what I’m doing wrong?

When you specify the “style” parameter, you are not modifying the

current set of styles. Instead, you are completely replacing all of the

styles that would ordinarily be created. That’s why, for example, your

“stay on top” window lacks a title bar, a border, and all of the

standard window controls.

If you change wx.STAY_ON_TOP to wx.DEFAULT_FRAME_STYLE|wx.STAY_ON_TOP,

your example works.


Tim Roberts, ti...@probo.com

Providenza & Boekelheide, Inc.