Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Form resizing
Hi Alexandre,

Happy New Year and sorry for the delay in answering. I am using the OnAsyncResize, but have tried both and there do not seem to be any difference. I have tried to make a small program to demonstrate the behavior, but it is not as simple as that.

Making a simple from, with a region anchored top, left and right, it does resize on the fly. Only to the designed width though. If the region is assigned as OnTop, or Client aso., it does resize all the way.

I'll try to explain the behavior I experience: My form has a designed size of 1080 * 888. I have a region, left 16 with a width of 856, leaving another 16pixels on the right, between the region and forms right side. I put on a TMS grid (it too has a left of 16 like the region above it), put its usefullwidth and usefullheight to true to keep it within the boundaries of the screen size, and fill it dynamically with columns and rows, depending on the executed SQL statement. Sometimes the width of the grid is more than 1080 and sometimes smaller.

When I create the form, it starts with the designed size, and the adjust itself to the last know size of the browser window / tap. That's the first time the OnAsyncResize is fired. If the grid is smaller than the designed width, I can manually resize it to the designed size with out problems, that is, OnResize is only fired once. If the grid width is higher than the designed size (and higher than the current form width, OnResize fires only once when I increase the width. However, when I decrease it, it appears to be done in one go, but the OnResize is fired for every 16 pixels I have decreased it. Until it reaches the designed size.

With a grid wider than designed size: if I maximize the windows, and restore it, or if it is already at max when the grid is shown, and I restore it, the OnResize fires only once. The problem is only when I drag the right side towards the left.

Physically what happens, when a grid is larger than the browser window size at start, is that I can enlarge it and the normal components, region and others, will resize on the spot. The Grid will not. I have to make a roundtrip to the server, and use a OnClick event on a button for that. When dragging the right side of the browser window towards left, all components stay enlarged, and I have to press the button to decrease the width. However, as it only happens in blocks of 16 pixels, I have to press the button a number of times.

I tried with a timer, letting it press the button for every 50ms, and it works, but still in blocks of 16 pixels.

I have not been able to create a small test program to show the behavior which makes me believe it might be a combination of settings of various components, causing it. I just haven't found out which it is yet.

Still I hope this description have given you an idea of what it might be and I hope you can propose something I can do to try to solve the problem. The obvious solution is to disallow the user to resize the window by dragging it, and only allow Max and Restore, but I'm not happy with that.


Messages In This Thread
Form resizing - by SorenJensen - 12-06-2019, 08:40 AM
RE: Form resizing - by Jose Nilton Pace - 12-06-2019, 12:26 PM
RE: Form resizing - by SorenJensen - 12-11-2019, 11:32 AM
RE: Form resizing - by SorenJensen - 12-18-2019, 05:02 PM
RE: Form resizing - by Alexandre Machado - 12-28-2019, 04:06 PM
RE: Form resizing - by SorenJensen - 12-31-2019, 09:58 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)