GUI controls prefixes

From OpenPetra Wiki
Revision as of 13:09, 14 July 2010 by Pokorra (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

List of GUI control prefixes for .NET WinForm controls

All GUI related variables should have a suitable prefix. This helps readability and shows a definite difference between normal variables and GUI related variables.

All prefixes for GUI variables should be in lower case.


Controls listed in the following table are grouped similar to the SharpDevelop IDE.

Windows Forms
Label lbl
LinkLabel llb
Button btn
TextBox txt
Panel pnl
CheckBox chk
RadioButton rbt
ComboBox cmb
ListBox lst
CheckedListBox clb
TreeView tvw
ListView lvw
TabControl tab
  + TabPage tbp
PictureBox pic
Splitter spl
ToolBar tbr
MonthCalendar cal
DateTimePicker dtp
TrackBar trb
VScrollBar vsb
HScrollBar hsb
NumericUpDown nud
DomainUpDown dud
GroupBox grp
PropertyGrid prg
StatusBar stb
  + StatusBarPanel stp
PrintPreviewControl ppv
RichTextBox rtb
ProgessBar prb
ToolTip tip
Components
MainMenu mnu
ContextMenu cmu
  + MenuItem mni
NotifyIcon nic
PrintDocument prd
ImageList iml
Timer tmr
ErrorProvider erp
HelpProvider hlp
Dialogs
OpenFileDialog ofd
SaveFileDialog svd
FontDialog ftd
ColorDialog cod
PageSetupDialog psd
PrintPreviewDialog pvd
PrintDialog ptd
Data Controls
DataGrid grd
SourceGrid3 grd
My User Controls
UserControl  
> if it is simply a subform uco
> if it is used like a control use the prefix of the control where the user control is derived from + UC (eg. cmbUC) [in the case where a UserControl is a composite control of several controls: the prefix of the most important control of the controls that make up the UserControl]


Other
WinForm frm
Custom controls cc