cancel
Showing results for 
Search instead for 
Did you mean: 

handling screen resolution

Former Member
0 Kudos

Hi everybody,

Has anyone encountered the problem with the different screens resolution?

Is there anything in sap that deals with this problem?

(the main problem is the buttons i create that on a different resolution go on top of the nearby control)

Thanks in advance

Ronen

Accepted Solutions (1)

Accepted Solutions (1)

rasmuswulff_jensen
Active Contributor
0 Kudos

Resolution should only be a problem with Forms top and left property (Placement of form in client)... On the form there shouldn't be a problem. There are other problems that might have something to do with it:

Windows XP Theme (Luna) vs Win 2000 Theme (Classic)

It's a know bug that the height of forms in Luna is different in Classic... Try looking at a SAP Addon... The buttons is always placed to high up in Luna because SAP's internal development enviroment is Win 2000

Former Member
0 Kudos

Hi Rasmus,

What kind of problems ?

Is there anything in sap that i can use to fix those problems or should i simply do it in c# and thats it?

Ronen

rasmuswulff_jensen
Active Contributor
0 Kudos

I don't think I understand the problem then.. I never had any problem with the change of resolution before (Other than the one mentioned in the previous reply)

Former Member
0 Kudos

Hi Rasmus,

In the Reconciliation form (Banking -> Bank Statements -> Reconciliation)

I add few buttons near the "Print Settings" button.

In my resolution everything is ok but in other resolution those buttons goes on top of the nearby matrix.

What can i do about that?

Ronen

rasmuswulff_jensen
Active Contributor
0 Kudos

Could you try pasting the code that add the buttons?

Former Member
0 Kudos

SAPbouiCOM.Item iItem2 = base.Form.Items.Item("17");

iItem2.Top += 4;

iItem2.Height -= 4;

int ulX = iItem2.Left;

int height = iItem2.Height;

int ulY = iItem2.Top - height;

int width = iItem2.Width;

SAPbouiCOM.Item iItem = base.GeneralFunctions.AddItem(base.Form, "btnCPMtch", "Button", ulX, ulY, height, width);

((SAPbouiCOM.Button)iItem.Specific).Caption = "...";

iItem = base.GeneralFunctions.AddItem(base.Form, "btnPMtch", "Button", ulX + width, ulY, height, width);

((SAPbouiCOM.Button)iItem.Specific).Caption = "...";

iItem = base.GeneralFunctions.AddItem(base.Form, "btnDPMtch", "Button", ulX + width, ulY + height, height, width);

((SAPbouiCOM.Button)iItem.Specific).Caption = "...";

here im changing the size manually.

rasmuswulff_jensen
Active Contributor
0 Kudos

Hmm...

The Reconciliation form seems very strange... Normally a form with more than one matrix can't be sizeable, so perhaps SAP has done something special with this window, and that's what causing the problems...

I don't know if there are some work-around for it, but if its possible, you could make right-click entries instead of buttons? (If all other fails)...

Former Member
0 Kudos

Hi,

Don´t really know about that form, but in forms that size can be changed, SBO has 4 areas(Left-Up, Left-Down, Right-Up, Right-Down). Each control is related to one of them, and the position is calculated considering the relative position against the related edge. The problem is that you are giving the position relative to the Top-Up edge. Instead of that, calculate it relative to the related edge:

LeftUpItem.Left = X

LeftUpItem.Top = Y

LeftDownItem.Left = X

LeftDownItem.Top = FormHeight - Y (Y= Num. pixels distance from the edge)

...

RightDownItem.Left = FormWidth - X (X= Num. pixels distance from the edge)

RightDownItem.Top = FormHeight - Y (Y= Num. pixels distance from the edge)

Of course, you have to redefine it each time the form is resized. This has worked for me on other forms.

Hope helps,

Ibai Peñ

rasmuswulff_jensen
Active Contributor
0 Kudos

Ibai is right, but it shouldn't be a problem in your situation, since you base the placement of item 17 (Print settings)...

Former Member
0 Kudos

Yes, but I don´t see any mention about if the code is called in the resize method.

Could you confirm it, Ronen?

rasmuswulff_jensen
Active Contributor
0 Kudos

Hmm... In all my work, I've never needed to call placement code in the resize event. Strange...

Former Member
0 Kudos

First of all, thanks for your responses.

In my code, the 4th and 5ft variable passed to AddItem function are the Left and Top properties of the button.

Do i have to add resize code in every class that adds items?

Answers (0)