Rendering difference?


Author
Message
Miles Thornton
Miles Thornton
Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)Junior Member (17 reputation)
Group: Forum Members
Posts: 17, Visits: 1

I have a winforms app using the Nevron controls (which I like btw) but I am noticing a very odd behavior. I believe that there's likely a setting for this and I'd appreciate it if someone could point out what I'm doing wrong...

The issue is that the Nevron Edit Box Controls seem to render the Editcontrol differently! The "left" property appears to be moved significantly to the left when running on the server!

The issue is best seen in the two attachments. One, running on my PC and the other running in my PROD environment, running on a windows server accessed via Remote Desktop...

Please help! This application is supposed to go live on Monday!


Attachments
Running on my PC.jpg (246 views, 78.00 KB)
Running on Server.jpg (226 views, 50.00 KB)
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

Hello Miles,

 

From the images you posted it looks like you have different DPI settings on both machines.

Unfortunately some of our UI controls currently doesn’t draw itself correctly when the DPI is set to more than 96.

One other customer with the similar problem suggested a workaround that may be is suitable for you too.

 

 

NForm form = new NForm();

 

//Depending of the AutoScaleMode property of the form you can evaluate scale factor as follows

if (form.AutoScaleMode == AutoScaleMode.Font)

{

      if (form.AutoScaleDimensions.Width > 6)

      {

            m_IsLargeFont = true;

            m_ScaleFactorX = form.AutoScaleDimensions.Width / 6;

            m_ScaleFactorY = form.AutoScaleDimensions.Height / 13;

      }

}

if (form.AutoScaleMode == AutoScaleMode.Dpi)

{

      if (form.AutoScaleDimensions.Width > 96)

      {

            m_IsBiggerDPI = true;

            m_ScaleFactor = form.AutoScaleDimensions.Width / 96;

      }

}

 

After the scale factors are evaluated you should set the size of the entry box:

 

private void ScaleEntryBox(NEntryBox entryBox)

{

      if (m_IsLargeFont)

      {

            int height = (int)(entryBox.Height * m_ScaleFactorY);

            int width = (int)(entryBox.Width * m_ScaleFactorX);

            entryBox.Height = height;

            entryBox.Width = width;

      }

      if (m_IsBiggerDPI)

      {

            int height = (int)(entryBox.Height * m_ScaleFactor);

            int width = (int)(entryBox.Width * m_ScaleFactor);

            entryBox.Height = height;

            entryBox.Width = width;

      }

}

 

I hope this works for you.

Please, let us know if the problem persist.



Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search