If OpenWindow(0, 0, 0, 322, 205, "StringGadget Flags", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) #PB_String_MaximumLength: Set the maximum number of characters which can be entered.Ī 'mini help' can be added to this gadget using GadgetToolTip().Įxample Shows possible flags of StringGadget in action. SetGadgetAttribute() with the following attribute: #PB_String_MaximumLength: Returns the maximum number of characters which can be entered. GetGadgetAttribute() with the following attribute: SetGadgetColor() and GetGadgetColor() functions with the following values as 'ColorType': The following functions can be used to act on this gadget: #PB_EventType_LostFocus : The StringGadget lost the focus. #PB_EventType_Focus : The StringGadget got the focus. #PB_EventType_Change : The text has been modified by the user. The following events are supported through EventType(): Later the content can be changed with SetGadgetText() and received with GetGadgetText(). Then the return-value is the auto-generated gadget number on success. If #PB_Any was used as the #Gadget parameter Returns nonzero on success and zero on failure. #PB_String_BorderLess : No borders are drawn around the gadget. #PB_String_UpperCase : All characters are converted to upper case automatically. #PB_String_LowerCase : All characters are converted to lower case automatically. #PB_String_Password : Password mode, displaying only '*' instead of normal characters. #PB_String_Numeric : Only (positive) integer numbers are accepted. It can be a combination of the following values: To get multi-line input, use the EditorGadget() function.įlags to modify the gadget behavior. This gadget accepts only one line of text. The initial content of this StringGadget. The position and dimensions of the new gadget. It allows the user to enter a single line of text.Ī number to identify the new gadget. Result = StringGadget(#Gadget, x, y, Width, Height, Content$ ) DescriptionĬreates a String gadget in the current GadgetList.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |