View previous topic :: View next topic |
Author |
Message |
Anonymous Guest
|
Posted: Sun Feb 26, 2006 10:11 am Post subject: Trouble with changing focus between windows. |
|
|
I am trying to do the folowing:
I open one window (%ww) for data input and output including some button controls.
Depending on the user's actions a second window (%ww) opens next to the first one to provide additional means for data input and evaluation.
Now when window #2 is open, the controls of window #1 cannot be operated. That means, the buttons show the depressed status all right when activated by my mouse, but the callback function is not called.
None of the windows use &lw becasue I do not want the prog to carry on while the two windows are open.
I am using clearwin+
Any ideas would be welcome.
Norbert |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Mon Feb 27, 2006 12:56 am Post subject: Trouble with changing focus between windows. |
|
|
Norbert
If you want the first window to remain active when the second window is open then you must make the second window "modeless" by using %lw in the winio@ declaration of the second window.
See "Closing a window" in the FTN95 help file.
Regards
Paul |
|
Back to top |
|
|
ursuselasticus
Joined: 26 Mar 2005 Posts: 71
|
Posted: Mon Feb 27, 2006 9:43 am Post subject: Trouble with changing focus between windows. |
|
|
Thanks Paul, did not know that and surely give it a try.
Norbert |
|
Back to top |
|
|
ursuselasticus
Joined: 26 Mar 2005 Posts: 71
|
Posted: Wed Mar 01, 2006 12:06 pm Post subject: Trouble with changing focus between windows. |
|
|
Paul,
sorry for bothering you further but just one more question:
How do I make the second window to wait for input after I used %lw? My prog carries on in processing data that are not available, sleep@ stops the prog completely, not accepting any input. But the prog should wait until input from either window #1 or #2 is available.
That possible ?
Thanks in advance.
Norbert |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7928 Location: Salford, UK
|
Posted: Wed Mar 01, 2006 12:55 pm Post subject: Trouble with changing focus between windows. |
|
|
Norbert
If you want to be able to access the first window without closing the second then the main idea is that you do not wait for the data.
1) Use COMMON blocks (say) to hold the common data.
2) Use callback functions on the controls to detect changes in the data.
3) When a change is detected that requires an update, process the data in a callback and (if necessary) use window_update@ to update values that are displayed one of the windows.
Regards
Paul
|
|
Back to top |
|
|
|