well... not exactly programatically - it does require a creating an 
object (or duplicating an existing one).

- You can place a text object anywhere on the form (I am assuming you 
mean a static text object, like a field/variable label).
- Name to object.
- set the property 'invisible by default'.

During runtime you can then:
- object set title(*;<objectname>;Array{element})
- object set visible(*;<objectname>;True)
- utl_Object_Move(Nil_ptr;Absolute_left;absolute_top;<objectname>)



code for utl_object_Move:

  //Project Method:  utl_Move_Object
  //$1 - Pointer - to object to move - if Nil, use object name passed 
in $4
  //$2 - Longint - absolute left location to place object
  //$3 - Longint - absolute top location to place object
  //$4 - Text (optional) - Object Name, only used if Nil pointer passed 
in $1

  //move an object to it's absolute left and top (supplied) position
  // ∙ Created 10/17/12 by Chip - 
C_POINTER($1;$Object_ptr)
C_LONGINT($2;$3;$New_Top;$New_Left;$Top;$Bottom;$Left;$Right)
C_TEXT($4;$Object_Name)

$Object_ptr:=$1

If (Nil($Object_Ptr))
$Object_Name:=$4
$Object_ptr:=OBJECT Get pointer(Object named;$Object_Name)
End if 
$New_Left:=$2
$New_Top:=$3

If (Not(Nil($Object_ptr)))
OBJECT GET COORDINATES($Object_ptr->;$Left;$Top;$Right;$Bottom)

$Right:=$Right+($New_Left-$Left)
$Bottom:=$Bottom+($New_Top-$Top)
OBJECT MOVE($Object_ptr->;$New_Left;$New_Top;$Right;$Bottom;*)
Else   //object to be moved is a text or other object which can't be 
referenced via pointer
OBJECT GET COORDINATES(*;$Object_Name;$Left;$Top;$Right;$Bottom)

$Right:=$Right+($New_Left-$Left)
$Bottom:=$Bottom+($New_Top-$Top)
OBJECT MOVE(*;$Object_Name;$New_Left;$New_Top;$Right;$Bottom;*)
End if 
  //End utl_Move_Object


On Tue, 27 Nov 2018 19:48:20 +0000, Peter Mew via 4D_Tech wrote:
> Hi
> Is it possible to, programatically, create an object that consists of text
> from an element of an array, and place it at a specific location on a form
> 
> thanks
> -pm
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[email protected]
> **********************************************************************
---------------
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to