I've been investigating using the '?' and '@' for help. I've run into a stumbling block. I know a way 'around' the problem, but....
The issue is that the '@' does get the CURRENT data from the string provided when the winio@ is executed. Which is great. I'm using that. However, for a help string that needs to change contents dynamically when the user performs a specific action, a simple window_update@() for either the control or the string is ineffective. I have to redraw the whole window for the change to be recognized.
The code below illustrates this. Clicking on the rado button should force the displayed text (internally) to change, but the HELP when rolling over the control does not change.
I don't know if there is another facility that I am not aware of that would allow this to be dynamic.
winapp
program main
integer:: iw,winio@,ijk=1
integer,external:: close_window
character*260:: buffer='this is not quite a file name but might serve as an example'
character*32:: help_phrase
common/help_common/iw,help_phrase
read *,help_phrase
iw = winio@('%ac[Ctrl+C]&', 'COPY')
iw = winio@('%cm[Copy]&', 'COPY')
iw = winio@('%?`25re[]@%ff%nl&',buffer,help_phrase)
iw = winio@('%rd %?`^~rb[]@%ud%2nl&',iw,iw,ijk,close_window,help_phrase,999)
iw = winio@('%50.2cw[hscroll,vscroll]&', 10)
iw = winio@('%lw',ictrl)
do i = 1,100
write(10,*) 'Line ', i
end do
end
integer function close_window()
use mswin
integer:: user_data,iw
character*32:: help_phrase
common/help_common/iw,help_phrase
user_data = clearwin_info@('USER_DATA')
!print *,user_data
help_phrase = 'New Phrase'
call window_update@(help_phrase)
call window_update@(iw)
close_window = 1
return
end