SG_EditorGadget | ||||||||||||||||||||||||
Syntax: | ||||||||||||||||||||||||
Result=SG_EditorGadget(SG_GadgetID_L.l, X_Pos_L.l, Y_Pos_L.l, Width_L.l, Height_L.l, [Flags_L.l]) | ||||||||||||||||||||||||
Parameters: | ||||||||||||||||||||||||
| ||||||||||||||||||||||||
Return Values: | ||||||||||||||||||||||||
| ||||||||||||||||||||||||
Description: | ||||||||||||||||||||||||
Creates a Editor gadget in the current screen. SG_GadgetID_L will be the number returned by SG_EventScreenGadgetID() command. The Editorgadget is based on items. So every line represents an item, which can individually changed. Also the Front- and backcolor, and the Font can be changed seperatly. Later the content can be changed with SG_SetGadgetText() and received with SG_GetGadgetText() or with SG_...Item() - commands the following commands will work with this gadget: - AddGadgetItem(): add a line - GetGadgetItemText(): get the content of the line - SG_GetGadgetFont(): The font of the first item - SG_GetGadgetItemFont(): The font of the specified item - GetGadgetText(): get the contant of the whole gadget - RemoveGadgetItem(): remove a line - ClearGadgetItemList(): clear all lines - SetGadgetItemText(): (over)write the line - SetGadgetItemFont(): set the font for this line - SetGadgetText(): change the whole text of the gadget, each line have to be seperated with CRLF - SetGadgetFlag(): sets the flags of the gadget - SG_ShowListItem(): Scroll the Gadget so that the specified item is visible | ||||||||||||||||||||||||
Example: | ||||||||||||||||||||||||
| ||||||||||||||||||||||||
Remarks: | ||||||||||||||||||||||||
These gadget uses a Sprite to render the text to the screen. The sprite is created using #PB_Any. Make sure you doesn´t use these sprites in other ways In other words create all sprites you try to use before you create an editorgadget oder check with issprite() if the sprite exists or not. For editing gadgets (currently Stringgadgets and Editorgadgets) there are the following keys availalble: - All Chars - Up - Down - Left - Right - Home - End - Del - Backspace - Return/Enter | ||||||||||||||||||||||||
|