cancel
Showing results for 
Search instead for 
Did you mean: 

Fixing Field Location

Former Member
0 Kudos

I have some user-defined fields at the header level of a system form that are moving (inappropriately) when the form is resized. I want them to stay where I placed them. What can be done?

View Entire Topic
Former Member
0 Kudos

I am sorry for being unclear. I am using the UI API to move both system-defined and user-defined fields on the form, as such:

oForm.Items.Item("91").Left = 50

oForm.Items.Item("MyField").Top = 100

However, while some of the fields remain fixed where I place them, others move with the form resize. What can be done to keep them fixed in the location where I have placed them?

Former Member
0 Kudos

I would find a item that you want to relate to.

Set the left (or top ...) property with relation to that, in the Event where you create the item and also on the et_FORM_RESIZE event.


dim oRelateItem as SAPbouiCOM.Item
dim oMyItem as SAPbouiCOM.Item

set oRelateItem = oForm.Items("SystemItem") 'that you think is a good benchmark for you

oMyItem.Left = oRelateItem.Left + oReletItem.Width + 25
oMyItem.Top= oRelateItem.Top

don't see why this should fail.

Indika.

Message was edited by: Indika Dekumpitiya