From 76841b8c325afa4ed67d52b7e8d4aafbe1b61fdf Mon Sep 17 00:00:00 2001 From: FellippeHeitor Date: Fri, 30 Dec 2016 20:02:44 -0200 Subject: [PATCH] PictureBox now takes Align and VAlign property. --- InForm/xp.uitheme | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/InForm/xp.uitheme b/InForm/xp.uitheme index a066664..c9894fc 100644 --- a/InForm/xp.uitheme +++ b/InForm/xp.uitheme @@ -1408,7 +1408,7 @@ END SUB '--------------------------------------------------------------------------------- SUB __UI_DrawPictureBox (This AS __UI_ControlTYPE, ControlState AS _BYTE) - DIM PrevDest AS LONG + DIM PrevDest AS LONG, TheX AS INTEGER, TheY AS INTEGER DIM CaptionIndent AS INTEGER, TempCaption$ IF This.Stretch <> This.PreviousStretch OR This.PreviousValue <> This.HelperCanvas OR This.ControlState <> ControlState OR This.PreviousParentID <> This.ParentID OR __UI_ForceRedraw THEN @@ -1437,7 +1437,15 @@ SUB __UI_DrawPictureBox (This AS __UI_ControlTYPE, ControlState AS _BYTE) IF This.Stretch THEN _PUTIMAGE (0, 0)-(This.Width - 1, This.Height - 1), This.HelperCanvas, This.Canvas ELSE - _PUTIMAGE (0, 0), This.HelperCanvas, This.Canvas + TheX = 0 'Default = Left + IF This.Align = __UI_Center THEN TheX = This.Width / 2 - _WIDTH(This.HelperCanvas) / 2 + IF This.Align = __UI_Right THEN TheX = This.Width - 1 - _WIDTH(This.HelperCanvas) + + TheY = 0 'Default = Top + IF This.VAlign = __UI_Middle THEN TheY = This.Height / 2 - _HEIGHT(This.HelperCanvas) / 2 + IF This.VAlign = __UI_Bottom THEN TheY = This.Height - 1 - _HEIGHT(This.HelperCanvas) + + _PUTIMAGE (TheX, TheY), This.HelperCanvas, This.Canvas END IF IF This.HasBorder = True THEN