Reinier Maliepaard Appendix A: Naming Conventions

Appendix A: Naming Conventions


While abbreviations like btn for "Button" are common, many developers opt for full words to ensure clarity and maintainability. Whether you choose abbreviations or full names, the key is consistency across your project. If you use btn for one button, use btn for all buttons rather than mixing in button or but.

The following list provides a reference for abbreviations and full names.

Abbreviation Widget / Class Name
btnButton
chkCheckBox
comboComboBox
grpGroupBox
inputInputLine
labelLabel
listListBox
radioRadioButton
radiolistRadioButtonList
scrollbarScrollbar
imgImage
imgbtnImageButton
linkHyperlink
formForm
frameFrame
framesetFrameset
dlgDialog
editEdit
gridGrid
nbTabbedNotebook
objObject
timerTimer
spinbtnSpinButton
spineditSpinEdit
widgetWidget
winWindow

You can make a name more descriptive by adding a suffix (or a prefix). A few examples:

  • btnCancel
  • chkPerl
  • comboColor
  • frameSidebar
  • imgLogo
  • inputEmail
  • ok_btn
  • translate_btn
  • etc.