Change font size in UnoControlGridModel

awm119 awm119 at gmail.com
Mon Apr 22 16:24:45 UTC 2019


I've developed a Calc Dialog with several controls including the dynamic 
gridmodel control. The only font property I've been able to change 
successfully is GridModel.TextColor. Other font properties have no 
affect. Is there a specific syntax for setting the font size? I've tried 
several alternative property settings, but nothing seems to work other 
than the text color.

dlgmodel = oDialogInventory.getModel()
     gridmodel = 
oDialogInventory.getModel().createInstance("com.sun.star.awt.grid.UnoControlGridModel")
     with gridmodel
         .PositionX = 8
         .PositionY = 33
         .Width = 150
         .Height = 55
         .TextColor = RGB(255,0,0)
       end with

Thank you..........awm119



More information about the LibreOffice mailing list