
For consistency and clarity, shouldn't the following "Disable..." commands be replaced by the "Set...State" commands instead?
DisableGadget --> SetGadgetState
DisableMenuItem --> SetMenuItemState
DisableToolBarButton --> SetToolBarButtonState
DisableWindow --> SetWindowState
For example,
To "Enable" a Gadget now, you must do this:
Code: Select all
DisableGadget(#Button_1, #False)
Instead this might be better to Enable the Gadget:
Code: Select all
SetGadgetState(#Button_1, #PB_State_Enabled)
Code: Select all
SetGadgetState(#Button_1, #PB_State_Disabled)
#PB_State_Enabled and #PB_State_Disabled could possibly even be used for all the commands?
Perhaps even SetGadgetItemState could be used to enable/disable individual gadget items as well?
We would have four less commands to remember (any others?) and Set...State seems more intuitive and consistent for setting the enabled/disabled "states"?
[Edit]
-- See post below about maybe also replacing HideGadget and HideMenu using Set...State instead as well --