|
ED
|
not used
|
RT
|
avaliable
|
This property moves the dynamic element. The parameter define
the new position. Update the element after using this method.
Hint: Change the parameters Bottom and Right for correct
operation.
'*** Move element BITMAP_BTN_1 Public Sub LeftClickUp_Element_Move(obElem As Element) Dim obElement As Element Dim obPicture As DynPicture Dim nHeight As Long Dim nOldTop As Long Set obPicture = obElem.Parent.Parent If (obPicture Is Nothing) Then MsgBox "Error: Picture-object is invalid..." Exit Sub End If Set obElement = obPicture.Elements.Item("BITMAP_BTN_1") If (obElement Is Nothing) Then MsgBox "Error: element BITMAP_BTN_1 doesn't exists..." Exit Sub End If nHeight = (obElement.Bottom - obElement.Top) nOldTop = obElement.Top '*** moves element If (obElement.Bottom > obPicture.Height) Then obElement.Move obElement.Left, 0, obElement.Right, (nHeight) Else obElement.Move obElement.Left, obElement.Bottom, obElement.Right, (obElement.Bottom + nHeight) End If '*** update picture obElement.Update obPicture.Update obElement.Left, nOldTop, obElement.Right, (obElement.Bottom + nHeight) obElem.LeftClickUp End Sub