Eric,
Of course that was totally simple, you need 'callbacks'
Try these modifications:
winapp
program test
implicit real*8 (a-h,o-z)
character*24 text_in
common/text_stuff/text_in
common/number_stuff/real_value,int_value,itext_length,product
include <windows.ins>
external icb1
text_in=' '
real_value = 0d0
int_value = 0
i=winio@('%ca[Put up a caption]&')
i=winio@('%bg[btnface]&')
!circumflex adds callback to control
i=winio@('Text entry %`bg[white]%^rs&',text_in,icb1)
i=winio@('%ffReal*8 entry %`bg[white]%^rf&',real_value,icb1)
i=winio@('%ffInt*4 entry %`bg[white]%^rd&',int_value,icb1)
!use of grave accent makes field write only
i=winio@('%ff%nlNumber of characters'// %`rd&',itext_length)
i=winio@('%ffProduct %`rf&',product)
i=winio@('%ff%tt[Click to Go!]')
print *,text_in
print*,real_value,int_value
end
! callback number 1 - does everything with all fields
! can be split into multiple callbacks specific to each input field
integer*4 function icb1()
implicit real*8 (a-h,o-z)
character*24 text_in
common/text_stuff/text_in
common/number_stuff/real_value,int_value,itext_length,product
! if function result is 1, updated all fields in form
icb1 = 1
itext_length = leng(text_in)
product = real_value * int_value
end
This code is totally untested, I'm just eating my breakfast and then off to work to fight with my new Vista downgrade, slower and a whole new set of bugs.
Regards
Ian