Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3316

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

$
0
0

Hi Leon,

 

I would go use something like this:

 

SAPbouiCOM.Item oItem = null;

SAPbouiCOM.StaticText oStatic = null;

 

oItem = oForm.Items.Add("stExample", SAPbouiCOM.BoFormItemTypes.it_STATIC);

oItem.Top = oForm.Items.Item("2").Top; //I set the top of my static text as the top of cancel button

oItem.Height = oForm.Items.Item("2").Height; //I set the height of my static text, equals the height of cancel button

oItem.Left = oForm.Items.Item("2").Left + oForm.Items.Item("2").Width + 5; //I set the position of my static text beside the cancel button

oItem.Width = 260;

oItem.RightJustified = true;

 

The result:

 

teste.PNG

The black area is my space in the form, and the red area is my static text area, that I define with width 260, and set the RightJustified for true..


Viewing all articles
Browse latest Browse all 3316

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>