WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 08-23-2013, 04:57 AM
madeinjava madeinjava is offline
Member
 
Join Date: Dec 2011
Posts: 5
Question Window always on top

Hi all,

Is there any way to get my vizard window always on top?
I have an application that will run parallel with vizard's window together in the same screen. but when I click on my app button the vizard window is covered again with my main app.
This is my vizard window setup:

...
viz.window.setPosition(500,500)
viz.window.setSize(700,300)
viz.window.setBorder(viz.BORDER_NONE)
viz.window.setFloat()

viz.go()
...
...
even though in the vizard help the setFloat() function will set the window to stay on top but here in my case it does not.
Its work only when during the compiling I press the vizard logo. then I get my vizard window always on top. but I can not make it when publishing to exe since you can not press the vizard logo when you publish to EXE file.

Is there any way to get my vizard window always stay on top?

Thanks!
Reply With Quote
  #2  
Old 08-23-2013, 09:09 AM
Frank Verberne Frank Verberne is offline
Member
 
Join Date: Mar 2008
Location: Netherlands
Posts: 148
The function viz.window.setFloat() should indeed make your vizard window stay on top of other windows. You mention something about pressing the Vizard logo. I don't know what you're doing in the rest of your code, but if your code is in some kind of loop from the start, it could be that the first frame is not drawn yet, and nothing of the settings are applied. You could add this piece of code to wait for the first frame to be drawn:

Quote:
import viz
import viztask

def wait():
yield None

viztask.schedule(wait())
To be sure, does this code alone also give troubles:
Quote:
import viz

viz.window.setPosition(500,500)
viz.window.setSize(700,300)
viz.window.setBorder(viz.BORDER_NONE)
viz.window.setFloat()

viz.go()
It works in Vizard 4, and it should work in Vizard 3 as well.

Furthermore, check the settings of the application you want to run in parallel. If both of them want to be on top, you could get issues...

Last edited by Frank Verberne; 08-23-2013 at 09:13 AM.
Reply With Quote
  #3  
Old 08-23-2013, 09:27 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
I believe the problem is that the command is being called before the window is created ( i.e. viz.go() ). Try changing your code to the following:
Code:
viz.window.setPosition(500,500)
viz.window.setSize(700,300)
viz.window.setBorder(viz.BORDER_NONE)

viz.go()

viz.window.setFloat()
This will be fixed in a future release though.
Reply With Quote
  #4  
Old 08-23-2013, 09:52 AM
Frank Verberne Frank Verberne is offline
Member
 
Join Date: Mar 2008
Location: Netherlands
Posts: 148
That was my original thought as well, although in Vizard 4 that's no problem.
Reply With Quote
  #5  
Old 08-27-2013, 02:10 PM
madeinjava madeinjava is offline
Member
 
Join Date: Dec 2011
Posts: 5
Thumbs up

Quote:
Originally Posted by farshizzo View Post
I believe the problem is that the command is being called before the window is created ( i.e. viz.go() ). Try changing your code to the following:
Code:
viz.window.setPosition(500,500)
viz.window.setSize(700,300)
viz.window.setBorder(viz.BORDER_NONE)

viz.go()

viz.window.setFloat()
This will be fixed in a future release though.
Works like a charm! Thanks farshizzo and Frank!
Reply With Quote
Reply

Tags
stay on top, window

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unexpected Change of Window Size javadi Vizard 7 07-23-2013 02:56 PM
[win7] Bad quality when not on primary monitor or window has no focus Huib Vizard 5 04-12-2012 06:34 AM
Using a texquad to cover a window Enlil Vizard 4 02-07-2012 03:13 PM
tkinter window focus John P Vizard 4 08-31-2009 05:51 AM
The error window that couldn't FlyingWren Vizard 2 12-02-2003 08:23 AM


All times are GMT -7. The time now is 01:15 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC