Translate

Adroit Newsletter

Sign up now for the latest news and updates in Adroit

Graphic Forms Print E-mail
1. Why is an exception thrown when a child graphic form is loaded in a templateGO?

Answer:

One possible problem is that an Alias is being "triggered" while having a null value (i.e. a value is being written when the value is null) To fix this problem the source of the value (on the parent graphic form) needs to have the "Propagate outputs at startup" option enabled. This will force a non-null value to be written initially.

2. Why does my DateTimePicker control continually cycle its months after clicking on a month scroll button?

Answer:

This will occur when something is being triggered by the DateTimePicker.valueChanged event. To resolve this use the DateTimePicker.closeUp event instead of the DateTimePicker.valueChanged event.

3. Why can I not export or import graphic forms?

Answer:

Both the importing and exporting of graphic forms are disabled when using the 14 day evaluation Server license.

4. Why can I not double click on a control or an event to get the stub for an event handler in the graphic form script?

Answer:

The ability to automatically create script when you double click on a control or in the event handler, is now a configurable item in the profile settings, which is OFF by default and needs to be turned on manually by the user.

To do this:
Edit the required profile and in the “Profile Properties” page ensure that the “Add Graphic Form Script Events on Double-click” checkbox is enabled.

5. How do I use the OpenGraphicObject command from within a graphic form script event handler?

Answer:

ONE: Add the following references to this graphic form script:
using VIZNET.Shared.Helpers;
using VIZNET.Shared.DataElements.Collections;

TWO: Add the following code to the required event handler procedure (for instance the Click event of a button):
// Fill in the full name of the required graphic form (this can be found in the GraphicFormName property of this graphic form)
string __gfName = "[Testing] Testing 's Server.Proj001.Graphic Form";
MethodReturnInfo __mri = MyConnection.ReadDataElements( new string[] { __gfName } );
if (__mri.Success == true )
{
DataElementCollection __dec = __mri.ReturnObject as DataElementCollection;
if(__dec != null)
{
IGraphicObject igo = __dec.GetElementByKeyValue(__gfName).Value as IGraphicObject;
MyApplication.OpenGraphicObject(igo, GraphicObjectDialogType.Replace);
}
}

6. How can I create a tooltip for a vector graphic on a graphic form?

Answer:

Since Vectors are components and not controls, you cannot add a tooltip directly to a vector. However, you can add a transparent panel to the area where the tooltip should be activated, and then add the tooltip to the transparent panel instead. In other words:

1. Create the panel.
2. Move the panel to location of the vector.
3. Add tooltip to the panel.
4. Change the background colour of the panel to transparent.