ErrorProvider Xojo and Real Studio Plugin |
|
ErrorProvider.ShowError Method
Shows a error for a given control. In this variation shows the error on the right side of the control which is the default side.
ShowError(
source as RectControl,
message as String,
centerVertically as Boolean)
Parameters
- source
- The error provider will be displayed side by the control that is provided by this parameter.
- message
- The message to show. This message is shown in tooltip when hovering mouse over the error, it can also optionally be shown in other ways by using the events on the ErrorProvider.
- centerVertically
- If set to true then the error will be displayed vertically centered by the source control, else it will be displayed near the top.
Remarks
If the source control already has a error then existing error is removed and the new posted instead.
Example:
if tbName.Text.Len < 2 then
ErrorProvider1.ShowError(tbName,"Name must have at least two letters",true)
end if
if tbPhone.Text.Len < 7 then
ErrorProvider1.ShowError(tbPhone,"Phone number must have at least 7 letters",true)
end if
See Also
ErrorProvider Control