` Printed Icetips Article

Icetips Article



Par2: Template to add icons to buttons + a bunch of other button stuff
1999-08-02 -- Geoff Bomford
 
#EXTENSION (GWBAddIcons, 'Add Icons to Buttons'), APPLICATION, LAST
#!--------------------------------------------------
#! Add Standard Icons to buttons, make buttons flat
#! This template was developed by GW Bomford - All rights reserved
#!--------------------------------------------------
#!
#BUTTON ('Add Standard Icons to All Buttons'), AT(10,, 180)
  #SHEET
    #TAB ('Add Icons and Specify Flat Buttons')
    #IMAGE('GWBCopy.WMF'),AT(,,180,60)
    #BOXED('Icons on Buttons')
      #DISPLAY()
      #PROMPT ('Add standard Icons to Buttons?', CHECK), %GWBAddIcons,
AT(10)
      #DISPLAY()
      #ENABLE (%GWBAddIcons), CLEAR
        #PROMPT ('Make All Buttons FLAT?', CHECK), %GWBFlatButtons,AT(10)
      #ENDENABLE
      #DISPLAY()
    #ENDBOXED
    #ENDTAB
    #TAB ('Notes on Usage')
    #IMAGE('GWBCopy.WMF'),AT(,,180,60)
      #BOXED ('Icons and Flat Buttons')
         #DISPLAY ('')
         #DISPLAY ('This template adds standard icons to buttons')
         #DISPLAY ('and includes the icons used in the exe file.')
         #DISPLAY ('If you specify to use Icons, you can also')
         #DISPLAY ('make the buttons FLAT!')
         #DISPLAY ('')
         #DISPLAY ('Note: Buttons with Icons need to be 50 * 20 in size!')
         #DISPLAY ('')
      #ENDBOXED
    #ENDTAB
  #ENDSHEET
#ENDBUTTON
#!
#!
#!--------------------------------------------------
#AT(%CustomGlobalDeclarations)
  #PROJECT('Exit.Ico')
#ENDAT
#!--------------------------------------------------
#AT(%WindowManagerMethodCodeSection,'Init','(),BYTE'),WHERE(%GWBAddIcons),PR
IORITY(9000),AUTO
  #FOR(%Control),WHERE(%ControlType = 'BUTTON')
    #CASE (SUB(UPPER(%Control),1,5))
    #OF ('?EXIT')
    #OROF ('?CLOS')
%Control{Prop:Icon} = '~Exit.Ico'       #




Printed November 21, 2024, 11:18 am
This article has been viewed/printed 35210 times.