Float on Frame or stay on top Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
grommit100
Knows some wx things
Knows some wx things
Posts: 36
Joined: Thu Apr 28, 2005 9:17 pm

Float on Frame or stay on top

Post by grommit100 »

I am running Suse 9.x.
I know wxSTAY_ON_TOP is windows only.
So I found wxFLOAT_ON_FRAME.

This doesn't seem to work, in that it has no effect whatsoever.
I create my main frame, then create the smaller frame. I can bring the smaller frame to the front, but when I click on the fullscreen frame, the smaller one (that is supposed to be floating on it) disappears behind it.

The only way to fix this is to go down to the KDE toolbar, right click on the program label, and check "always on top". Then it works.

How can I do this programatically? Is there a certain order of operations that has to be followed?
I printed the address of the frame both when I created it, and when I passed it as the parent of the small frame. They are the same.

Help!
User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Re: Float on Frame or stay on top

Post by ABX »

grommit100 wrote:I know wxSTAY_ON_TOP is windows only.
It doesn't really help you much but it is worth to mention that wxSTAY_ON_TOP occurs in code of wxMSW, wxMGL and wxX11. So not exactly "windows only".

ABX
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2
grommit100
Knows some wx things
Knows some wx things
Posts: 36
Joined: Thu Apr 28, 2005 9:17 pm

Post by grommit100 »

The docs said windows only. They should probably be updated.
I guess that I should have mentioned that I am running the GTK version.
chris
I live to help wx-kind
I live to help wx-kind
Posts: 150
Joined: Fri Oct 08, 2004 2:05 pm
Location: Europe

Post by chris »

From the changelog (ftp://biolpc22.york.ac.uk/pub/2.6.1/changes-2.6.1.txt) for 2.6.1:
wxGTK:

- Added support for wxSTAY_ON_TOP (GTK 2.4+).
So, if you are using wxWidgets 2.6.1 linked against GTK2 then at least wxSTAY_ON_TOP should work.

HTH, Chris
this->signature=NULL;
grommit100
Knows some wx things
Knows some wx things
Posts: 36
Joined: Thu Apr 28, 2005 9:17 pm

Post by grommit100 »

wxWidgets is 2.6.0, GTK is 2.2-3

So..... I guess I will update later and see if everything gets fixed.
What's the latest stable release?

Thanks for the info.

Chris
User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Post by ABX »

grommit100 wrote:What's the latest stable release?
http://www.wxwidgets.org/downld2.htm

ABX
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2
leio
Can't get richer than this
Can't get richer than this
Posts: 802
Joined: Mon Dec 27, 2004 10:46 am
Location: Estonia, Tallinn
Contact:

Post by leio »

grommit100 wrote:wxWidgets is 2.6.0, GTK is 2.2-3
It seems your gtk+ version is too ancient? (at least 2.4 required per changes.txt)
Compilers: gcc-3.3.6, gcc-3.4.5, gcc-4.0.2, gcc-4.1.0 and MSVC6
OS's: Gentoo Linux, WinXP; WX: CVS HEAD

Project Manager of wxMUD - http://wxmud.sf.net/
Developer of wxGTK;
gtk+ port maintainer of OMGUI - http://www.omgui.org/
grommit100
Knows some wx things
Knows some wx things
Posts: 36
Joined: Thu Apr 28, 2005 9:17 pm

Post by grommit100 »

I may not have gotten the gtk version right.
I did:
rpm -qa |grep gtk

and got some numbers that approached that.
Is there a better way to get the exact version number?

Thanks,

Grommit.
chris
I live to help wx-kind
I live to help wx-kind
Posts: 150
Joined: Fri Oct 08, 2004 2:05 pm
Location: Europe

Post by chris »

Try "pkg-config --modversion gtk+-2.0". Alternatively have a look at /usr/lib/gtk-2.0/, there may be a subdirectory like "2.4.0" or such.

And yes, SUSE versions at notoriously out of date :(
That's why I switched my computers to Debian and Ubuntu.

Chris
this->signature=NULL;
leio
Can't get richer than this
Can't get richer than this
Posts: 802
Joined: Mon Dec 27, 2004 10:46 am
Location: Estonia, Tallinn
Contact:

Post by leio »

grommit100 wrote:Is there a better way to get the exact version number?
If you have the development package of gtk+ installed, you should be able to
do

Code: Select all

pkg-config --modversion gtk+-2.0
or

Code: Select all

grep 'define GTK_M...._VERSION' /usr/include/gtk-2.0/gtk/gtkversion.h
If you don't, then the libraries long name should tell you the version also good enough:

Code: Select all

ls /usr/lib/libgtk-x11-2.0.so.0.*
I have /usr/lib/libgtk-x11-2.0.so.0.600.8 from which I can read out, that I have gtk+ version 2.6.8.
I believe the pattern has always been that for version 2.y.z the libname is libgtk-x11-2.0.so.0.y00.z
Compilers: gcc-3.3.6, gcc-3.4.5, gcc-4.0.2, gcc-4.1.0 and MSVC6
OS's: Gentoo Linux, WinXP; WX: CVS HEAD

Project Manager of wxMUD - http://wxmud.sf.net/
Developer of wxGTK;
gtk+ port maintainer of OMGUI - http://www.omgui.org/
Post Reply