Skip to Content
Aug 20, 2015 at 02:29 PM

Is there a way to center the caption of a static text?


Hi, everybody

I am developing an SDK add-on using VB.NET.

I don't use Screen Painter or any other visual tools. All dimensions are specified by coding.

For ex. This is how I code a Static Text

oItem = Form1.Items.Add("Static3", SAPbouiCOM.BoFormItemTypes.it_STATIC)

oItem.FontSize = 16

oItem.Left = 150

oItem.Top = 190

oItem.Width = 200

Static1 = oItem.Specific

Static1.Caption = "Transfer of Goods From"

Is there a way to center the Caption within the item width of 200 specified?

By default, the caption is left justified.

I think there is no direct way to achieve this.

But is there a workaround?

Any ideas are most welcome.