FarPoint.Win アセンブリ > FarPoint.Win 名前空間 > ElementControl クラス : AlignText プロパティ |
'宣言
Public Overridable Property AlignText As TextAlign
public virtual TextAlign AlignText {get; set;}
このプロパティは、ピクチャの配置を基準としたテキストの配置を取得または設定します。
コントロールの内容の水平および垂直方向の配置を指定するには、AlignHorzプロパティとAlignVertプロパティを設定します。
control.Picture = Image.FromFile(Application.StartupPath + "\\smokes.bmp"); control.PictureMargin = 34; control.MarginTop = 3; control.MarginBottom = 3; control.MarginLeft = 3; control.MarginRight = 3; control.PictureOrientation = FarPoint.Win.PictureOrientation.PictureRotate180; control.AlignText = FarPoint.Win.TextAlign.TextLeftPictRight; control.AlignHorz = FarPoint.Win.HorizontalAlignment.Left; control.BackColor = Color.Red; control.Text = "NO SMOKING"; private void button1_Click(object sender, System.EventArgs e) { // Turn off the No Smoking sign control.Visible=false; }
control.Picture = Image.FromFile(Application.StartupPath & "\smokes.bmp") control.PictureMargin = 34 control.MarginTop = 3 control.MarginBottom = 3 control.MarginLeft = 3 control.MarginRight = 3 control.PictureOrientation = FarPoint.Win.PictureOrientation.PictureRotate180 control.MarginTop = 3 control.MarginBottom = 3 control.AlignText = FarPoint.Win.TextAlign.TextLeftPictRight control.AlignHorz = FarPoint.Win.HorizontalAlignment.Left control.BackColor = Color.Red control.Text = "NO SMOKING" Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'Turn off the NO Smoking sign control.Visible = False End Sub