Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sat Oct 21, 2017 4:16 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Window allways on the top (banner like) ?
PostPosted: Sun Jun 02, 2013 3:51 am 
Offline

Joined: Fri Nov 25, 2011 3:14 am
Posts: 27
Location: Serbia
I have two windows, Window1 with TextField and Window 2. Window1 is main application window and Window2 is floating window supposed to be an advertisment banner activated by the timer (it check text every 3 sec.) once in the runtime when in the textfield user writes "banner".

Problem is in the focus!

When Window2 (advertisment) is showed I loose focus on TextField on the Window1. Window2 is correctly showed but user must manually click on textfield to get focus again.

Is there way to solve this problem?

_________________
Dr Boris Tadić
Medical Software Development
www.digitsoft.rs


Top
 Profile  
Reply with quote  
 Post subject: Re: Window allways on the top (banner like) ?
PostPosted: Sun Jun 02, 2013 5:15 am 
Offline
User avatar

Joined: Mon Apr 02, 2007 2:08 am
Posts: 1225
Location: San Francisco, CA, USA
In the advertisement window's Close event, set the focus back to the textfield:
Sub Close()
Window1.TextField1.SetFocus()
End Sub

_________________
Boredom Software


Top
 Profile  
Reply with quote  
 Post subject: Re: Window allways on the top (banner like) ?
PostPosted: Sun Jun 02, 2013 5:54 am 
Offline

Joined: Fri Nov 25, 2011 3:14 am
Posts: 27
Location: Serbia
Yes, I know that.. But I need to preserve Window2 opened while user enterning text in TextField. Idea is just to show advert in new advert windows (Window2) when user enter target text, without user interaction and without stopping him in enterning text.

_________________
Dr Boris Tadić
Medical Software Development
www.digitsoft.rs


Top
 Profile  
Reply with quote  
 Post subject: Re: Window allways on the top (banner like) ?
PostPosted: Sun Jun 02, 2013 1:39 pm 
Offline
User avatar

Joined: Thu Jul 27, 2006 6:31 pm
Posts: 1698
Location: Monterey, CA
A few things come to mind;
1) What OS are you on? Knowing this is important when answering questions. Focus behavior varies between OSes.

2) How are you initiating the new window?

If you're using implicit initialization:
Window2.show


Then try initializing it like this instead and see if it makes a difference:
dim w as Window
w=new Window2


3) Does it need to be a floating window? From a user standpoint, more windows = more clutter. If you can, I'd encourage you to move to an elastic interface where you have the banner embedded within your main window, and when the user does whatever is needed to eliminate the banner, you hide it and resize the interface to fill that space.

Hope that helps.

_________________
ImagePlay Effects Library (40+ image effects in one open source module. No plugins, no dependencies, no restrictions.)
http://imageplay.sourceforge.net/


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group