Hi All.
I'm new here so go easy on me!
I'm also fairly new to Navision and have been dropped in the deep and told I need to create a .Net schedule control for use in the RTC. I've managed to find out how to create an addin and have successfully got it loaded in a page. I can even use it in the RTC if I run the page. Amazing!
However, it needs to be scaled to fill the whole screen. Currently it's static at about 900pixels wide and around 300ish high. obviously, if a user resizes the page, or for users on different resolution screens, the size of the control needs to adjust depending on the page size. In winforms, there is a property called "Dock" that can force a control to fill all of the space available to it. Unfortunately, because my control is a custom usercontrol, this option isn't available to me, and I'm not sure it would be relevant anyway. This setting, or one similar would need to be in Navision surely?
So, to my actual question...
How do I force an addin control to populate the entire page (or container) is resides in, and have it rescale when the page size changes?
Many thanks,
Karl
0
Comments
http://www.BiloBeauty.com
http://www.autismspeaks.org
Just dock.Fill the control you pass back on the CreateControl Method!
Yep, this worked! I was looking in the wrong place for the Dock feature. Thanks for putting me right.
However, now my custom control seems to be too big for the page?
While I can resize the RTC window and the control resizes within it, it seems to be that the control is around 100 pixels wider and taller than the page displaying it? Do you have any idea whay this would be? Currently, to get it to fit "properly", I'm having to expand the design of the user control background Panel by approximately 100 pixels to the right and the same to the bottom so the bottom left of the RTC page shows the bottom left of the control?
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
The problem was down to the .Net control having an "AutoScaleMode" set to "Font".
I changed this to "Inherit" and now my control is the correct size on all platforms.