Shiny Language Reference
Language Reference > User Interface > Edit Boxes
User Interface Edit Boxes
Creating and managing single line edit controls
Although using editboxes is easy, understanding how to fit the pieces together may not be immediately obvious. This download contains a sample plugin that demonstrates how to use editboxes.
Inside the zip is one SSP plugin pack. Install the editboxdemo.ssp pack file into Brass using the "Install SSP" option in the Brass "File" menu. This installs an SSE along with 2 PNG images that are required for the sample to work. When the SSP has been installed you can find the source code in <Brass Install Folder>\SSE\EditBoxDemo.
The SSN demonstrates how to create and use simple editboxes, as well as how to create and use custom drawn editboxes with PNG images.
Handler prototype for Edit boxes
function Handler_Name(int iControlID, int iMessage)
{
}
Valid Messages for Edit boxes
SSEdit #define Value Meaning EDITBOX_GOTFOCUS 0 Passed when the edit control is left clicked to activate it EDITBOX_LOSTFOCUS 1 Passed when a previously activated edit control loses the input focus EDITBOX_ENTER 2 Passed when the user presses Return in the edit box EDITBOX_RETURN EDITBOX_TEXTCHANGE 3 Indicates the text in the edit control has changed (either added or deleted)
SSEdit contains a templatized handler function for use in your plugins. You may insert the template into your code using the SSEdit Code Wizard.
createeditbox - Creates an edit box in the display panel
seteditboxstyle - Sets the visual appearance of an edit box
seteditboxdrawfunc - Allows a plugin to draw its own edit box
seteditboxfont - Sets the font used for the edit box text
seteditboxfontcol - Sets the colour of the font used for the edit box caption
seteditboxcaretcol - Sets the colour of the caret
seteditboxcaretpos - Set the position of the caret within the control
geteditboxcaretpos - Retrieve the position of the caret within the control
seteditboxtextrect - Set the bounding rectangle for text in the edit control