[1/3] from: sanghabum:aol at: 30-Sep-2001 6:06
I asked this a few weeks ago, and I think maybe my question got lost in the general excitement. I still haven't worked it out for myself, so I hope you don't mind if I ask again. I have two separate panels. One's a floating control panel and the other is the user's main display. When they click a control button panel, focus should go to a field on the main display. The only way I can find to do this is to unview and view again the main display. This creates an annoying flicker. I appreciate that I may need to do this when the main display is buried or minimised, but I can't find an unflickering way to do it in other cases. There's some sample code below which also demonstrates a little mystery under (at least) Windows/98...try this: --Click "Control button" --Minimize the Main Display --Click "Control button" again And--et voila!--the Main Display cannot be unminimized! (The answer is extra code is handle the strange offset that Main Display acquires during this procedure). ====== unview/all ControlPanel: layout [ Button "Control button" [unview MainDisplay View/new MainDisplay focus UserEntry ] ] MainDisplay: layout [UserEntry: Field 500x200] view/new/Title ControlPanel "Control" view/new/offset/Title MainDisplay ControlPanel/offset + ControlPanel/size Main Display do-events ====== Anyway, any help would be appreciated, --Colin
[2/3] from: carl:rebol at: 30-Sep-2001 10:59
One way is to tell the main-display face to become the active window: activate-face: func [face] [ face/changes: 'activate show face ] activate-face main-display This will make the window active, and will throw focus to it. However, on some operating system versions (like Win98), this may simply blink the task's icon in the task bar. At 9/30/01 06:06 AM -0400, you wrote:
[3/3] from: sanghabum::aol::com at: 30-Sep-2001 17:19
> One way is to tell the main-display face to become the active > window:
<<quoted lines omitted: 6>>> However, on some operating system versions (like Win98), this > may simply blink the task's icon in the task bar.
Thanks. That works fine for me on Windows 98. The key thing is that your method does not force a redraw each time, hence no flicker. There's still the odd interaction with the minimize function, so I need some extra code to save and restore the latest actual screen position. (View 1.2.1 must be cheating a little to implement Win98 minimize. It gives the panel an offset of 3000x3000. If that's hardwired, expect some complaints one day from HiRes multi-monitor users <g>). --Colin.
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted