Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Focus (carret?) - focus face, unfocus, system/view/focal-face

 [1/3] from: arolls:bigpond:au at: 28-Aug-2001 2:18


Use FOCUS: view layout [ across label "f1" f1: field "hello" return label "f2" f2: field "fleurs" below button "print focal-face" [probe system/view/focal-face/var] do [focus f1] ] You can find out which of your faces has the focus by comparing to system/view/focal-face, like this: find [f1 f2] system/view/focal-face It's also good to UNFOCUS sometimes, you should read that in some nice docs at rebol.com: Section 3.5 of http://www.rebol.com/how-to/fields.html By the way, it should be "caret" with one #"r". (I wouldn't want you to search around fruitlessly for "carret".)

 [2/3] from: ammoncooke::yahoo at: 27-Aug-2001 11:25


Thanks!! Ammon ----- Original Message ----- From: "Anton" <[arolls--bigpond--net--au]> To: <[rebol-list--rebol--com]> Sent: Monday, August 27, 2001 9:18 AM Subject: [REBOL] Re: Focus (carret?) - focus face, unfocus, system/view/focal-face

 [3/3] from: sanghabum::aol::com at: 27-Aug-2001 15:26


Can I add a question about focus? I've got two windows, and I want the user to do something in tbe other one. I can set the focus in the second window, but I don't know a decent way to make the second window the top one. For example: ========== unview/all Panel1: layout [field1: field button "Swap window" [focus field2]] Panel2: layout [field2: field button "Swap window" [focus field1]] view/new panel1 view/new panel2 do-events ========== Under windows, the focus does not leap from one window to the other....The user has to manually find and click it. I know I could do: Panel1: layout [field1: field button "Swap window" [ unview/panel2 focus field2 View/new Panel2 ] ] But that's overkill, and makes the window flicker if it is at all complicated. Any suggestions? Thanks, Colin.