コントロール - ScreenLeftプロパティ 

ScreenLeftはスクリーンの左側からの距離を設定します

コントロール (PRIM_CTRL) のメンバ

データタイプ - 整数

詳細

ScreenLeft プロパティは、画面上のコントロールの位置を指定します。 

親に対してコントロールの位置を決定するには、 Left プロパティを使用します。

この例では、画面上でフォームを移動します。 

     Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM) Caption('Screen Positioning Example') Height(207) Left(498) Top(312) Width(360) Clientwidth(344) Clientheight(168) Layoutmanager(#TableLayout1)

Define_Com Class(#PRIM_TBLO) Name(#TableLayout1)
Define_Com Class(#PRIM_TBLO.Column) Name(#Column1) Displayposition(1) Parent(#TableLayout1)
Define_Com Class(#PRIM_TBLO.Row) Name(#Row1) Displayposition(1) Parent(#TableLayout1)
Define_Com Class(#PRIM_TBLO.Item) Name(#TopleftItem1) Alignment(TopLeft) Column(#Column1) Manage(#Topleft) Parent(#TableLayout1) Row(#Row1) Sizing(None) Margintop(4) Marginleft(4)
Define_Com Class(#PRIM_TBLO.Item) Name(#TopRightItem1) Alignment(TopRight) Column(#Column1) Manage(#TopRight) Parent(#TableLayout1) Row(#Row1) Sizing(None) Margintop(4) Marginright(4)
Define_Com Class(#PRIM_TBLO.Item) Name(#BottomLeftItem1) Alignment(BottomLeft) Column(#Column1) Manage(#BottomLeft) Parent(#TableLayout1) Row(#Row1) Sizing(None) Marginleft(4) Marginbottom(4)
Define_Com Class(#PRIM_TBLO.Item) Name(#BottomRightItem1) Alignment(BottomRight) Column(#Column1) Manage(#BottomRight) Parent(#TableLayout1) Row(#Row1) Sizing(None) Marginbottom(4) Marginright(4)

Define_Com Class(#PRIM_PHBN) Name(#Topleft) Caption('Top Left') Displayposition(3) Left(4) Parent(#COM_OWNER) Tabposition(3) Top(4) Width(100)
Define_Com Class(#PRIM_PHBN) Name(#TopRight) Caption('Top Right') Displayposition(4) Left(240) Parent(#COM_OWNER) Tabposition(4) Top(4) Width(100)
Define_Com Class(#PRIM_PHBN) Name(#BottomLeft) Caption('Bottom Left') Displayposition(2) Left(4) Parent(#COM_OWNER) Tabposition(2) Top(139) Width(100)
Define_Com Class(#PRIM_PHBN) Name(#BottomRight) Caption('Bottom Right') Displayposition(1) Left(240) Parent(#COM_OWNER) Tabposition(1) Top(139) Width(100)

Evtroutine Handling(#Topleft.Click)

#Com_owner.ScreenTop #Com_owner.Screenleft := 0

Endroutine

Evtroutine Handling(#TopRight.Click)

#Com_owner.ScreenTop := 0
#Com_owner.ScreenLeft := #sys_appln.Monitors<1>.WorkWidth - #Com_owner.Width

Endroutine

Evtroutine Handling(#BottomLeft.Click)

#Com_owner.Screenleft := 0
#Com_owner.ScreenTop := #sys_appln.Monitors<1>.WorkHeight - #Com_owner.Height

Endroutine

Evtroutine Handling(#BottomRight.Click)

#Com_owner.ScreenTop := #sys_appln.Monitors<1>.WorkHeight - #Com_owner.Height
#Com_owner.ScreenLeft := #sys_appln.Monitors<1>.WorkWidth - #Com_owner.Width

Endroutine

End_Com


参照

すべてのコンポーネント クラス
テクニカルリファレンス

  • No labels