format and help options work individually for %rf, but not together.
Thanks for the advice
Josef
[code]
WINAPP
INCLUDE <windows.ins>
CHARACTER129 file,new_file,help_file
CHARACTER10 file_name
character5 ss1
integer ii1,number
double precision rr1
INTEGER compile,link,run,i
EXTERNAL compile,link,run
file_name='KA_MASK'
number=5
ii1=876
rr1=123.45670d00
ss1='ABCDE'
C menu
help_file='myhelp.hlp'
i=winio@('%ca['//file_name//']&')
i=winio@('%mn[&File[&Open]]&','EDIT_FILE_OPEN','.',
+ file)
i=winio@('%mn[[&Save]]&','EDIT_FILE_SAVE','.',
+ new_file)
i=winio@('%mn[[Save &As]]&','EDIT_FILE_SAVE_AS','.*',
+ new_file)
i=winio@('%mn[[E&xit]]&','EXIT')
i=winio@('%mn[&Edit[&Copy]]&','COPY')
i=winio@('%mn[[Cu&t]]&','CUT')
i=winio@('%mn[[&Paste]]&', 'PASTE')
i=winio@('%mn[&Help[&Contents]]&','HELP_CONTENTS',
+ help_file)
i=winio@('%mn[[&Help on help]]&','HELP_ON_HELP',
+ help_file)
C input fields
i=winio@('%fn[Courier New]&') !select a font for subsequent text
i=winio@('%ap&',1,1) !set absolute position for the next control
i=winio@('%ww[]&') !change style of the window
i=winio@('%co[check_on_focus_loss,right_justify]&')
i=winio@('%3`rd&',number) ! display an integer, read only
i=winio@('%ap&',1,3) !set absolute position for the next control
i=winio@('%ww[]&') !change style of the window
i=winio@('%co[check_on_focus_loss,right_justify]&')
i=winio@('%10?rd[\'Help text 1 \']&',ii1) !create an edit box and display an integer that can be updated
i=winio@('%ap&',20,3)
i=winio@('%ww[]&')
i=winio@('%co[check_on_focus_loss,right_justify]&')
C this works
i=winio@('%10?rf['Help text 2 ']&',rr1) !create an edit box and display a floating point value that can be updated
C alternatively, the line below also works, but without help text
C i=winio@('%10rf[fmt=10.3f]&',rr1)
C tentative:
C i=winio@('%10?rf['Help text 2 ',fmt=10.3d]&',rr1) !help text string and format together do not work as expected
! help text is truncated at the end and numer is not formatted f10.3
i=winio@('%ap&',40,3)
i=winio@('%ww[]&')
i=winio@('%`bg[red]&') !set background colour
i=winio@('%co[check_on_focus_loss,left_justify]&')
i=winio@('%10?rs['Help text 3 ']&',ss1) !create an edit box and display a character string that can be updated
i=winio@('%ap&',1,7)
i=winio@('%20he&')
c--- Define buttons that are to be dispalyed ---
i=winio@('%2nl %^7bt[&Compile]&',compile)
i=winio@('%2nl %^7bt[&Link]&', link)
i=winio@('%2nl %^7bt[&Run]', run)
C intermediate results output
write(,) ii1,rr1,ss1
END
c--- Call-back functions that do nothing ---
INTEGER FUNCTION compile()
compile=1
END
INTEGER FUNCTION link()
link=1
END
INTEGER FUNCTION run()
run=1
END
[/code]