User Tools

Site Tools


widget

On occasion it may become necessary to guide the user to a specific sub-component of the User Interface (UI) - otherwise known as a widget. Directing the user to a specific widget is accomplished by defining an instruction of the widget type. The value of the type member is a String that represents the QObject::objectName assigned to the target widget. The name of a widget that exists in the interface can be obtained by using functionality provided by the UI Widget Map (WIP) pane.

While many widgets are uniquely named, sometimes you will find the same widget is used in multiple locations. For this reason, dot notation can be used to indicate a hierarchical context that leads to the widget you aim to guide the user to. When using dot notation, it is not necessary to specify every level of the hierarchy, but care should be taken to specify enough of the hierarchy to be unique. For instance:

  • AncestorWidgetName.GrandParentWidgetName.ParentWidgetName.TargetWidgetName
  • AncestorWidgetName.ParentWidgetName.TargetWidgetName
  • AncestorWidgetName.TargetWidgetName

By default, the user successfully completes the instruction by clicking on the targeted widget. If the locate_only member is defined, a click is only registered when the user clicks the tag/label leading to the widget, rather than on the widget itself.

In cases where a widget provides choice or state, an optional value member can be defined to cause the instruction to remain active until the user causes that value to be set. For instance, with a DzComboBox, specifying “value” : “torus” would guided the user to pick torus in the combobox. Similarly, “value” : false for a DzCheckBox widget would guide the user to make sure a checkbox is unchecked.

Click the name of the example below to save it as a file.

Interactive_Lesson_Widget_Example_1.dsa
var oLessonMgr = MainWindow.getInteractiveLessonMgr();
oLessonMgr.begin([
	{
	"widget": "LessonStripMenuBtn",
	"info": "You will find interactive and static Lessons in the Lesson Strip, which is located on the right side of the Status Bar."
	},
	{
	"widget": "LessonStripOverviewBtn",
	"info": "Click the Lesson Overview button for a video overview of the lesson."
	},
	{
	"widget": "LessonStripStepBtn",
	"info": "Click on Lesson Step buttons to toggle display of a step."
	}
]);