Many property sheets provide fields in which you can specify initial values for part properties. For example, the property sheet for the IEntryField* contains a property name for Text and Limit. In the value column of the property name for Text, you can enter a text string that you want to initially display in the entry field. You can change the default value of Limit, which is the maximum number of characters a user can type in the entry field, from 32 to the number you desire.
To facilitate national language support (NLS) translation and code changes in providing property values, such as the ones just described, you can enter a code string to provide those values. You must precede the code string with a number sign (#). If the first character of your code string is a #, enter two #s separated by a space:the first one to signify that a code string follows and the second one to begin your code string.
For example, suppose you want the initial text in an entry field to be Enter a name here. Further, suppose that you want the limit for this entry field to be 18 characters. In a user header file (.hpv or .h), you could insert the following #define statements:
#define NAME_PROMPT "Enter a name here" #define NAME_LENGTH 18
Be sure to enter the name of the file that contains these #define statements in the Required include files field in the Class Editor. Otherwise, this file is not included when you generate the code for this part.
Then, in the property sheet of the IEntryField* you could enter the following in the Text and Limit value column, respectively:
#NAME_PROMPT #NAME_LENGTH
By doing this, the values that you defined for NAME_PROMPT and NAME_LENGTH are used when you generate the source code for the part being edited.
Editing Part Properties
Opening the Property Sheet for
a Part
Applying Changes to Properties
After you make changes to the properties, you can activate them in either of the following ways:
To close the property sheet, select the Cancel push button. If you made changes and selected the Apply push button, the changes are saved.
For more help with using the property sheet, select the Help push button.
Editing Part Properties
Opening the Property Sheet for
a Part
Using Code Strings in Part
Properties
