|
Using the Class with Hand Code |
Top Previous Next |
|
Using the class with Hand Code ...
Smart-Type is provided as an ABC Compliant Class.
To use it in your application without the template ...
1. In the Global 'After Includes' embed ...
2. In the procedure data declarations ...
Instantiate a class for each control you wish to enable ...
3. In the procedure - thiswindow.init embed after opening the window
Call the init method of the class. There are 4 parameters
There are several ways you can modify the behaviour of the smart-type class ...
Lets's assume the object is st ...
Properties (you can see this in smart-type.inc) st.Learning Byte(1) ! Set to zero to disable learning on insert key st.LearningQuestion String('Add this to list of phrases ? ') !Question to ask when Insert Pressed st.EnterCompletes Byte(0) ! Replace Enter with a Tab key so it completes the field st.EnterCompletesIfFull Byte(1) ! Replace Enter with Tab key if textbox is full, and no scroll attribute st.ControlEnterToTab Byte(1) ! Convert Control+Enter to a tab so it completes the field st.ListLength long(10) ! The Maximum length of the popup list (you might want to set his lowe4 for fields at the bottom of the screen) st.NoPopupToolbox Byte(0) ! Disable Popup Toolbox window st.ListSeparator Cstring(10) !Add this character to the end of each selection
Methods
st.SetEventToPost Procedure(long EventToPost) ! call this before init to set user defined event to use
|