* Conditionally release bars. ReleaseBar( 101, a_menupops[1], 'mfn' ) ReleaseBar( 102, a_menupops[1], 'mfo' ) ReleaseBar( 103, a_menupops[1], 'mfs' ) * etc. ReleaseSeparators( a_menupops[1], 'main_file', m.cMenuName ) ReleaseBar( 201, a_menupops[2], 'men' ) ReleaseBar( 202, a_menupops[2], 'mnu' ) * etc. ReleaseSeparators( a_menupops[2], 'main_edit', m.cMenuName )releasebar.prg:
* Conditionally releases a bar. * Parameters: * 1 tnBar Barnumber. * 2 tcPopup Popup name. * 3 tcUA UserAccess string. lparameter tnBar, tcPopup, tcUA if not UserAccess( tcUA ) release bar tnBar of (tcPopup) endifreleaseseparators.prg:
* Releases separators that are senseless. * Even releases the whole pad if it contains no longer any item. * Parameters: * 1 tcPopup Popup name. * 2 tcPad Pad name. * 3 tcMenu Menu name. lparameters tcPopup, tcPad, tcMenu local llPrevSep, ln, lnBar llPrevSep = .f. for ln = cntbar( m.tcPopup ) to 1 step -1 * lnBar = getbar( m.tcPopup, m.ln ) * if empty( prmbar( m.tcPopup, m.lnBar ) ) && a separator has an empty prompt * if m.ln = 1 or m.ln = cntbar( m.tcPopup ) or m.llPrevSep = .t. * release bar m.lnBar of ( m.tcPopup ) else llPrevSep = .t. endif else llPrevSep = .f. endif next if cntbar( m.tcPopup ) > 0 * lnBar = getbar( m.tcPopup, 1 ) * if empty( prmbar( m.tcPopup, m.lnBar ) ) && if first bar is a separator * release bar m.lnBar of ( m.tcPopup ) endif endif if cntbar( m.tcPopup ) = 0 && if there's no longer any bar * release pad ( m.tcPad ) OF ( m.tcMenu ) && then remove the pad too endif