Extra functionalities in Form_Justification_Mode
<< Back
As we have talked about how to force uppercasing in a Grid using Form_Justification_Mode,
it turns out we can do a few more things with Form_Justification_Mode inside a plain old Grid.
- |CI$9 - Force uppercase.
- |CI$90 - Force lowercase.
- |CI$A0 - Force password. However it is rather useless because the moment you exit out "Edit" mode, the Grid will display the password in plain text.
- |CI$100 - When you first enter into "Edit" mode in any cell, it will highlight the content of the cell by default. Setting this flag
will prevent the default behavior.
- |CI$400 - Gray background when you are editing. Rather useless.
- |CI$2000 - Force Readonly. It will prevent you from pasting content directly to the cell as well.
You can mix and match the above attributes by using IOR. Obviously it doesn't make sense to IOR uppercasing and lowercasing...
Use DfAllEnt
Object oPanel is a Panel
Set Size to 75 400
Object oGrid is a Grid
Set Size to 50 380
Set Line_Width to 6 0
Set Header_Label 0 to "Uppercase"
Set Form_Width 0 to 50
Set Form_Justification_Mode 0 to 9
Set Header_Label 1 to "Lowercase"
Set Form_Width 1 to 50
Set Form_Justification_Mode 1 to |CI$90
Set Header_Label 2 to "Password"
Set Form_Width 2 to 50
Set Form_Justification_Mode 2 to |CI$A0
Set Header_Label 3 to "No higlight"
Set Form_Width 3 to 60
Set Form_Justification_Mode 3 to |CI$100
Set Header_Label 4 to "Gray"
Set Form_Width 4 to 50
Set Form_Justification_Mode 4 to |CI$400
Set Header_Label 5 to "Readonly"
Set Form_Width 5 to 50
Set Form_Justification_Mode 5 to |CI$2000
Procedure Page_Object Integer iPage
Forward Send Page_Object iPage
Send Add_Item Msg_None ""
Send Add_Item Msg_None ""
Send Add_Item Msg_None ""
Send Add_Item Msg_None "ABC"
Send Add_Item Msg_None ""
Send Add_Item Msg_None "ABC"
End_Procedure
End_Object
End_Object
Start_UI