Skip to Content
0

Specify opening position of Form

Nov 16, 2016 at 09:10 AM

59

avatar image

I am using SAP Business One 9.2 SDK UI API (C#) and I am wondering how can I specify the opening position of a Form I created. All the system forms save their last position and window size and the next time I open them, they open in the saved position. When I create a Form in SDK and open it, it always opens at the (0,0) position (leftmost and top) and at the initial size, so the user needs to manually grab and move the form every time.

Do I need to manually implement this feature somehow?

c# | ui | forms | uiapi
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
DIEGO LOTHER Nov 16, 2016 at 10:53 AM
1

Hi Szalbocs,

I usually set left = 310 and top = 10 by default. If you want implement this situation, you can create an UDT to store the formType, userID, left and top, and when you load your form, you can set the left and top based on your table.

Kind Regards,

Diego Lother

Share
10 |10000 characters needed characters left characters exceeded
Pedro Magueija Nov 16, 2016 at 06:22 PM
1

I'd like to add that forms linked with a UDO automatically get positioned to their last position.

Pedro Magueija

LinkedIn | Twitter | Blog

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Do you usually create a UDO for a form your addon creates?

0

Hi Szabolcs,

That depends on the addon I'm creating. Usually, if the "concept" I'm modeling represents a "document" or some sort of "master data", then yes. If I'm creating a form for simple data, such as category names, then no.

I find that for the simple data, most users don't care that the form is always centered and not on the "last position".

For more elaborate forms (normally representing "documents"), the users tend to prefer their settings to be persisted.

Everyone is different, so your mileage may vary.

Pedro Magueija

LinkedIn | Twitter | Blog

1