DI_FIXEDIT

Far Manager

DI_FIXEDIT

The DI_FIXEDIT dialog item describes a fixed size edit box. It is the same as DI_EDIT, except the text in the DI_FIXEDIT cannot be scrolled.
struct FarDialogItem
{
  int Type          = DI_FIXEDIT
  int X1            = X1
  int Y1            = Y
  int X2            = X2
  int Y2            = Y (equals to Y1)
  int Focus         = Focus
  union{
    char *History   = History
    char *Mask;     = Mask
  };
  DWORD Flags       = Flags
  int DefaultButton = DefaultButton
  char Data[512]    = the text for editing
};

Attention! Attention!

  • This is an exemplary structure; read full description here.

Focus

Keyboard focus flag.

History

Contains the address of a null-terminated text string that will be used as the internal history name when an edit control has the DIF_HISTORY flag. If several edit fields have the same history name, they will share the same history list.

Mask

Contains the address of a null-terminated string that serves as a mask for user input when the DIF_MASKEDIT flag is set. NULL value means the edit field has no input mask.
The DIF_HISTORY flag has higher priority than the DIF_MASKEDIT flag.

Flags

There are several flags applicable to DI_FIXEDIT:
FlagDescription
DIF_HISTORY Adds a history list to an edit control. If this flag is set, the History field must contain the address of a text string that will be used as the internal name of the history.
DIF_MANUALADDHISTORY Specifies that items will be added to the history list of an edit box only manually and not automatically. Must be used together with DIF_HISTORY.
DIF_USELASTHISTORY The initial value will be set to the last history element.
DIF_MASKEDIT Uses the null-terminated string in the Mask field as a filter for user input.
DIF_DISABLE Disables user access to the edit control.
DIF_READONLY Sets read-only state for the edit control.
DIF_SELECTONENTRY Makes the edit control always select the text when it receives the focus.
DIF_NOFOCUS The dialog item cannot receive keyboard focus, but can handle other user events.

Events

EventDescription
DN_DRAWDLGITEM This event is sent to the dialog callback function just before the edit box is drawn.
DN_CTLCOLORDLGITEM Plugin should pass the color attributes of the edit control when this event comes. Param2 parameter:
LoWord LoByte - color of the text
                (COL_WARNDIALOGEDIT or
                 COL_DIALOGEDIT)
LoWord HiByte - color of selected text
                (COL_DIALOGEDITSELECTED)
HiWord LoByte - color of unchanged text
                (COL_DIALOGEDITUNCHANGED)
HiWord HiByte - color of the History drop-down arrow
                (COL_DIALOGTEXT)
DN_KEY This event comes after the user has pressed a key in the dialog.
DN_MOUSECLICK This event comes after the user has clicked one of the dialog items or outside the dialog with the mouse button.
DN_EDITCHANGE The text in the edit field has been changed.
DN_KILLFOCUS This event is sent before the combo box loses the focus, if the flag DIF_NOFOCUS was not used.
DN_GOTFOCUS This event is sent after the button has received the keyboard focus, if the flag DIF_NOFOCUS was not used.

Remarks

The text cursor in the DI_FIXEDIT edit field will initially be in overwrite mode.

See also: