"contentsX", "contentsY"

The attributes contentsX and contentsY return the coordinate of an object, for example, of a TextEdit text or of a tree widget. contentsX returns the X coordinate of the contents (text) that are at the left edge of the view. contentsY returns the Y coordinate of the contents (text) that are at the top edge of the view.

Synopsis

getValue(string shape, "contentsX", int xCord);

getValue(string shape, "contentsY", int yCord);

Parameter

Parameter Description
shape Name of the object

xCord

yCord

The coordinate of a TextEdit text or of a tree widget.

Description

The attributes contentsX and contentsY return the coordinate of an object, for example, of a TextEdit text.

Example

main()
{
  int xCord,yCord;
  string obj1 = "TEXT_EDIT1";
  getValue(obj1,"contentsX",xCord);
  getValue(obj1,"contentsY",yCord);
  DebugN("x-coordinate",xCord);
  DebugN("y-coordinate",yCord);
}

Assignment

TextEdit, Tree widget, DpTreeView