10333 : Is there anyway the text can be placed outside the time object so when a print is performed the whole text can be seen?

Question

Using phGantTime and printing. We have text displayed in the time object. If the object is small then the text is truncated and cannot be seen on a printout. Is there anyway the text can be placed outside the time object so when a print is performed the whole text can be seen?

Answer

The latest patch has new functionality to render time item texts outside their time items.

You go like this to use it:

Private Sub addRow(textplacex As TxTextRectPlace, textplacey As TxTextRectPlace)
Dim de As IphDataEntity_Tree
Dim gr As IphGantRow3
Dim gt As IphDataEntity_GantTime2

If phGantX1.CurrentDataEntityTree Is Nothing Then
    Set de = phGantX1.AddRootDataEntityTree
  Else
    Set de = phGantX1.AddDataEntityTree(phGantX1.CurrentDataEntityTree)
  End If
 
  i = i + 1
  de.Text = “<new row>” + Str(i)
  Set gr = de.GantRow
  gr.TimeItems_CanChangeRow = False
  gr.TimeItems_CanMove = True
 
  Set gt = phGantX1.AddGantTime(de, 0)
  gt.Style = tsNormal
  gt.Start = Date
  gt.Stop = Date + 5
 
  gt.TimeItemsTextAdd
  gt.TimeItemsTextSetEx 0, de.Text, 2, 2, 0, textplacex, textplacey
         

End Sub

And the TxTextRectPlace type can have these values trpInside,trpOutsideNear,trpOutsideFar

 

 

Leave a Reply