how to enable or disable the action pane menu item buttons based on dimension value

in form name is LedgerJournalTransVendPaym field name is offsetaccount( it is dimension value ) in form level segmented entry control basedon this value enable and disable the buttons on action pane

any one help me the code