Can anyone help me to set the focus for a field to a certain part of the image? . I'm using a flexible document definition and when field is not found i would like to focus in an area where the user could see if the field is really missing without having to scroll.
Thanks
Thanks
コメント
5件のコメント
In a Block properties check Expression and input this code
Rect OutputRect = YourRegion;
If SearchElements.HisSourceElement.IsFound Then
{
OutputRect = SearchElements.HisSourceElement.Rect;
}
Else
{
IsNull = True;
}
OutputRegion = OutputRect;
where YourRegion – required region in global coordinates
I have something similar but it does not seem to be working:
Rect outputRect;
if avc_04r.dFecha.IsFound then
outputRect = Rect(dfecha.Rect.Left,dfecha.Rect.Top, dfecha.Rect.Right, dfecha.Rect.Bottom);
else
outputRect = Rect(1613pt, 1175pt, 2091pt, 1234pt);
OutputRegion = outputRect;
If element avc_04r.dFecha is not found i intent to focus on rect Rect(1613pt, 1175pt, 2091pt, 1234pt). This value is obtained using the measure rectangule tool. Are the units correct? Because it does not seem to work.
Thanks,
Please share a simple demo project where we can see what you do, what you get and please describe which behavior you actually expect.
Thanks again for your support. i've found that the problem is a matter of units. Changing units in function Rect from pt to dt, makes it works as expected.
サインインしてコメントを残してください。