Silverfrost Forums

Welcome to our forums

Property Sheet and ESC

13 Jan 2022 8:39 #28660

I have so many property sheets that they started to annoy me with this small defect.

Here is an example of property sheet from Clearwin Examples collection which is unchanged in 25 years. How to close property sheet using ESC key ? The OK and Cancel buttons are my own addition, they are needed too -- answer from these buttons are used to accept changes done in property sheet (OK), or to reject all changes after pushing Cancel. ESC will be used as Cancel

module aps_top
   implicit none
   integer ::ptr

contains

   integer function cbupdate()
      use mswin
      call see_propertysheet_page@(ptr) 
      cbupdate=2
   end function cbupdate
end aps_top


!
!      *******************************************
!      *                                         *
!      *  Changes the bottom property sheet      *
!      *                                         *
!      *******************************************

module aps_bottom
   use mswin
   implicit none
   integer :: xptr
   
contains   

   integer function xcbupdate()
      implicit none
      call see_propertysheet_page@(xptr) 
      xcbupdate=2
   end function xcbupdate
end aps_bottom

winapp           

program propsht
   use mswin
   use aps_top
   use aps_bottom
   integer :: i
   integer :: ps1,ps2,ps3
   integer :: xps1,xps2,xps3    
    ps1=1;ps2=2;ps3=2;xps1=1;xps2=2;xps3=3 
         ptr=2;xptr=3
         
!****************************************************************************
!*                                                                          *
!* Changes the top property sheet                                           *
!*                                                                          *
!****************************************************************************
         i=winio@('%ca[ Sheet 1]&')     
         i=winio@('Sheet one %bt[hellow aaa world]%sh',ps1) 
         i=winio@('%ca[ Sheet 2]&')
         i=winio@('Sheet two %bt[hellow xxx world]%sh',ps2) 
         i=winio@('%ca[ Sheet 3]&')
         i=winio@('Sheet three %bt[hellow zzz world]%sh',ps3) 
         i=winio@('%ca[ Sheet 1]&')     
         i=winio@('Sheet one %bt[hellow aaa world]%sh',xps1) 
         i=winio@('%ca[ Sheet 2]&')
         i=winio@('Sheet two %bt[hellow xxx world]%sh',xps2) 
         i=winio@('%ca[ Sheet 3]&')
         i=winio@('Sheet three %bt[hellow zzz world]%sh',xps3) 
         i=winio@('%ca[Grave PS Example]&')
         i=winio@('%bg[btnface]&')
         i=winio@('%sy[thin_border]&')
         i=winio@('%ob[raised]&')
         i=winio@('This is property sheet 1%ff%nl&')
   i=winio@('%`3ps&',ps1,ps2,ps3,ptr) 
   i=winio@('%ff%nlView Sheet Number:-&')
   i=winio@('%`bg[window]%il%dd%3^rd&',1,3,1,ptr,cbupdate) 
   i=winio@('%cb&')
   i=winio@('%ff%nl%ob[raised]&')
   i=winio@('This is property sheet 2%ff%nl&')
   i=winio@('%`3ps&',xps1,xps2,xps3,xptr) 
   i=winio@('%ff%nlView Sheet Number:-&')
   i=winio@('%`bg[window]%il%dd%3^rd&',1,3,1,xptr,xcbupdate) 
   i=winio@('%cb%ff&')
   i=winio@('%cn%bt[OK] %bt[Cancel]')

end program propsht
13 Jan 2022 4:01 #28661

Dan

It looks like accelerator keys are not working in the case for x64.

I have made a note of this failure.

10 Feb 2022 1:49 #28769

This has now been fixed for the next release of ClearWin64.dll.

13 Feb 2022 7:15 #28772

Thanks, Paul

Please login to reply.