James Thomas
Posts: 5
Joined: 2015-09-11
|
Hi,
I'm hoping someone can assist. I have built an addin for word usin hte ADXWordTaskPane. On my dev laptop the task pane shows up perfectly and everything works as needed.
However - when installing the addin on a second test laptop the width of the pane means some of the controls don't properly fit.
Therefore I need to increase the width of the pane but I've been unable to change the width. Please could someone provide some advice or help.
Thanks |
|
Andrei Smolin
Add-in Express team
Posts: 18827
Joined: 2006-05-11
|
|
James Thomas
Posts: 5
Joined: 2015-09-11
|
Hi,
The form is set to dpi scaling...
https://imgur.com/a/HOEIE
I had a look at your example but i'm unsure what I need to do to implement in my solution. I'm not that fluent in C and only use VB.NET.
I've just double checked and it's definitly the DPI scaling that's causing an issue. In windows 10 on the other test laptop the setting is 125%. When it's set to 100% and restarted the problems described go away. However - different user will have different DPI Scaling on their system so this needs to work irrespective.
Alternatively - if there is a way to dynamically resize the actual panel that may work. Changing the width does absolutely nothing. That way I could detect the DPI setting and manually adjust the panel to be e.g. 300px for 120dpi instead of 250px for 96dpi.
Please could you let me know if there's a solution to this.
Thanks
James |
|
Andrei Smolin
Add-in Express team
Posts: 18827
Joined: 2006-05-11
|
Hello James,
You should understand that the controls on the form gets resized if DPI changes (assuming that the controls' AutoScale isn't equal to None); this isn't the case with Add-in Express panes.
We suggest using the ADXAfterTaskPaneShow event (ADXWordTaskPane.ADXAfterTaskPaneShow in your case) to determine the current DPI and, if it differs from the standard one (96), resize your form. That example is based on analyzing the size change of any control that is located on the form (compare the current size to the size specified at the design time) - this allows you to get the coefficient which you use to resize the form.
You can use any C# to VB.NET code converter available online e.g. http://converter.telerik.com/ or https://www.carlosag.net/tools/codetranslator/.
Andrei Smolin
Add-in Express Team Leader |
|