window on top

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
jesse
Posts: 205
Joined: Thu Nov 11, 2010 6:32 pm

window on top

Post by jesse » Wed May 25, 2011 4:48 am

can anyone explain what code is used to bring a window to the front? I have a data grid row I double click on that opens up a new card
but for some reason i guess because of the double click the new card that opens up actually ends up behind the datagrid window.
how can i bring it to the front when it opens up? I dont need to keep it on top permanently just for the initial period when it opens.
Deving on WinVista Home Prem. SP2 32 bit. Using LiveCode 4.6.1 Pro Build 1392

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: window on top

Post by Mark » Wed May 25, 2011 9:41 am

Hi Jesse,

Once a stack is open already, the go command brings a stack to front.

Try something like this:

Code: Select all

on mouseDoubleUp
  send "openInFront" to me in 0 millisecs
end mouseDoubleUp

on openInFront
  go stack "Whatever the name is"
end openInFront
Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

jesse
Posts: 205
Joined: Thu Nov 11, 2010 6:32 pm

Re: window on top

Post by jesse » Thu May 26, 2011 1:48 am

Thanks Mark. I tried your suggestion unfortunately it did not work :(
I clicked the row in the data grid and the new window opened but still feel behind the datagrid. any other ideas?
Deving on WinVista Home Prem. SP2 32 bit. Using LiveCode 4.6.1 Pro Build 1392

jesse
Posts: 205
Joined: Thu Nov 11, 2010 6:32 pm

Re: window on top

Post by jesse » Thu May 26, 2011 3:49 am

I was able to figure it out finally, I think... It appears I was using the wrong command in the datagrid script.
I was using mouseDoubleDown but should have been using mouseDoubleUp. :P
Deving on WinVista Home Prem. SP2 32 bit. Using LiveCode 4.6.1 Pro Build 1392

doobox
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 284
Joined: Tue May 24, 2011 11:47 pm

Re: window on top

Post by doobox » Sun May 29, 2011 10:49 pm

Mark wrote:Hi Jesse,

Once a stack is open already, the go command brings a stack to front.

Try something like this:

Code: Select all

on mouseDoubleUp
  send "openInFront" to me in 0 millisecs
end mouseDoubleUp

on openInFront
  go stack "Whatever the name is"
end openInFront
Best regards,

Mark
Hi there i am interested why you illustrated the code above like you have.

Why cant that just be:

Code: Select all

on mouseDoubleUp
go stack "Whatever the name is"
end mouseDoubleUp
Any little tips like this will serve me well in learning live code.

Kind regards Gary.
Kind Regards
Gary

https://www.doobox.co.uk

Post Reply