wpaSetFlags method |
[Top] [Chapter] [Previous] [Next] |
This method can be used to update the flags provided by wpaGetFlags. Applies to Declaration procedure wpaSetFlags(Editor: Integer; Start: Integer; Count: Integer; const AllFlags: String);
public void wpaSetFlags(int Editor, int Start, int Count, byte[] AllFlags) Description It can be only used within the OnUpdateGUI event. With it you can manipulate the states of the buttons in the editor i.e. hide or disable some. You can use wpaGetFlags to first get the states of all buttons and the use wpaSetFlags to change the flags, or you use a new bytes array (with OCX use a string) only for the action you need to update. Note: If the "start" parameter is >0, the first element of the passed array will be mapped to the flag property of the action with the id "start".
While C# is used bits in the byte array, VB uses a string.
This bits are expected in the value element for each action. bit 1: action is enabled bit 2: action is selected (menu shows check, button is pressed) bit 3: action is hidden, it is not available bit 7: This bit is always set to avoid #0 entries.
Also see: wpaGetFlags() and OnUpdateGUI.
Example: Hide the "new" button:
This example uses the start/count parameter to only change one button.
The same as VB6 code:
Category: Action Names |