15-06-2012 11:08 AM
Hello,
I need to colorize simple text fields with a specific background color (MEGA 2009 SP2 CP3).
The BackgroundColorSet function seems to work only on fields that already have a background color.
If text field has no background color defined, then the function will have no effect.
Is there a way to define the background color of a field that does not have any yet?
Thanks in advance!
Sergueï
Set oDiagram = oRoot.GetObjectFromId("~Aw4yS7lsFP50[Diagramme de zones d'urbanisme]")
Set oDrawing = oDiagram.Drawing("RW")
For Each oDI In oDrawing.DrawingItems
  If oDI.DrawClassName = "DrwText" Then
    Set oFont = oDI.Font
    oFont.BackgroundColorSet 0, 255, 0, 0
    oDI.Font = oFont
  End If
Next
oDrawing.Flush
Set oDrawing = Nothing
Set oDiagram = Nothing
Solved! Go to Solution.
19-06-2012 05:58 PM - edited 15-01-2014 05:07 PM
Hello Sergueï
I can confirm a MEGA error.This issue has been escaladed to MEGA R&D (CR 31169).
A fix is available with HOPEX V1R1 adn higher versions.