cancel
Showing results for 
Search instead for 
Did you mean: 

How to view a grid in full screen?

leon_laikan
Participant
0 Kudos

Hi,

I am working on a Form which contains a grid. I use VB.NET 2010

There is only 1 Form, and it is generated in code (not Screen Painter)

When I run the Form in Visual Studio, or as an add-on in SAP BO ver 9.0, I would like the grid to open in Full Screen (Whole Page), i.e it fills the whole screen, just as if I had clicked the MAXIMIZE Button

What code should I use for this purpose?

Thanks

Leon Lai

Accepted Solutions (1)

Accepted Solutions (1)

maik_delly
Active Contributor
0 Kudos

Hi Leon,

in CreateForm() method append


oForm.State = SAPbouiCOM.BoFormStateEnum.fs_Maximized;

This is the same as pressing maximize button.

regards,

Maik

leon_laikan
Participant
0 Kudos

Hi Maik,

Thanks for your reply.

When I use your code, the form is maximized. OK!

Even though you will notice that the original oForm dimensions are still there!

'  // Set form width and height

        oForm.Height = 305

        oForm.Width = 600

        oForm.Title = "UI Grid sample"

        oForm.State = SAPbouiCOM.BoFormStateEnum.fs_Maximized

But the Grid remains at its original size (i.e not maximized).

I thought maximizing the form would maximize the grid also. This is the case when you click the Maximize button.

---------------

I tried to put your code near the Grid dimensions, but this does not work.

The form is maximized, but the grid has the original dimensions.

Besides, the data in the grid have disappeared.

        ' // Add a Grid item to the form

        oItem = oForm.Items.Add("MyGrid", SAPbouiCOM.BoFormItemTypes.it_GRID)

        ' Set the grid dimentions and position

        oItem.Left = 20

        oItem.Top = 60

        oItem.Width = 430

        oItem.Height = 200

        oItem.State = SAPbouiCOM.BoFormStateEnum.fs_Maximized    <--- Does not work!

Hope you can help.

Best Regards,

Leon Lai

maik_delly
Active Contributor
0 Kudos

Hi Leon,

you have to write oForm.State = SAPbouiCOM.BoFormStateEnum.fs_Maximized  at the end of method CreateForm.

The problem is, that you are setting the form size, then maximize it and then add a grid with specific size. You have to set / add everything and then maximize the form.

regards,

Maik



leon_laikan
Participant
0 Kudos

Hi Maik,

Ah stupid me! Of course!

I should have guessed.

This works fine!

Best Regards

Leon Lai

Answers (1)

Answers (1)

maik_delly
Active Contributor
0 Kudos

Hi Leon,

I realize that you are working through the SDK samples to get a specific requirement done.

From my point of view this is not really helping you.

The samples are good way to get a look into the SDK world of SBO.

BUT they are outdated and not maintained. Actually they are the same for almost 8 years.

"Nowadays" ( starting from SBO 9.0 ) it became a lot easier for beginners / small requirements working with SDK : B1 Studio. It offers a framework for Visual Studio 2010 ( easy eventhandling, graphic designing of forms, ready to work template ) and it is almost as working with windows forms.

regards,

Maik

leon_laikan
Participant
0 Kudos

Hi Maik,

Thanks a lot for your concern.

I understand what you mean.

But the problem is that I am a newbie in SDK (although I am well versed in SQL), and I have very little opportunity of learning SDK here in Mauritius (Maybe you've never heard of our country).

So, I learn from samples... and I am learning quite a lot!

After I will have mastered all these, I will switch to B1 Studio etc. Sure! Promise!

I am still at the learning stage. But I am trying to do something practical at the same time

Best Regards,

Leon Lai