HowTo Display Validaton Status ICONS in a Form [message #642816] |
Thu, 02 December 2010 14:26  |
Eclipse User |
|
|
|
Hello,
I am uisng XWT validation mechanism to display my validation rules status to a Form.
I have managed to get the message into the Form using pure XWT - nothing in code-behind class, but I cannot seem to get the status ICON vz SWT.ICON_ERROR, etc into the Form.
Here is my XWT Form:
<Shell
xmlns="http://www.eclipse.org/xwt/presentation"
xmlns:x="http://www.eclipse.org/xwt"
x:Class="snippets.ui.e4.forms.headclient.FormPage"
text="XWT Forms Application"
x:Name="shell"
dataContext="{StaticResource name}"
bindingContext="{StaticResource bindContext}"
xmlns:model="clr-namespace:snippets.ui.e4.databinding.model"
xmlns:v0="clr-namespace:snippets.ui.e4.databinding.validation.validators">
<Shell.layout>
<GridLayout/>
</Shell.layout>
<Shell.Resources>
<model:Name x:Key="name" />
<BindingContext x:Key="bindContext" />
</Shell.Resources>
<Form x:Name="form" text="{Binding source={StaticResource bindContext}, path=status}" font="MS Sans Serif,5,BOLD">
<Form.layoutData>
<GridData grabExcessHorizontalSpace="true" horizontalAlignment="FILL"/>
</Form.layoutData>
<Form.body>
<Form.body.layout>
<GridLayout numColumns="2"/>
</Form.body.layout>
<Label text="Name" x:Name="nameLbl"/>
<Text x:Style="BORDER" x:Name="nameText" ModifyEvent="onModify" text="{Binding Path=full, updateSourceTrigger=PropertyChanged, validationRule=v0:NameValidationRule}">
<Text.layoutData>
<GridData grabExcessHorizontalSpace="true" horizontalAlignment="FILL"/>
</Text.layoutData>
</Text>
</Form.body>
</Form>
</Shell>
<!-- Forms API -->
Could someone point me in the correct direction please?
Thanks
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03966 seconds