Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Compute SWT widget size according to Windows DPI(SWT widgets size not correctly scaling)
icon8.gif  Compute SWT widget size according to Windows DPI [message #1180937] Mon, 11 November 2013 08:56
Bogdan Niculeasa is currently offline Bogdan NiculeasaFriend
Messages: 1
Registered: November 2013
Junior Member
Hi all,

the problem that I'm facing is that when I'm changing the values of DPI in personalization->display->custom dpi to a value greater or equal with 110%, some of my widgets are not fully visibile any more. I'm setting the height and width of the label via .setLayoutData(). When the dpi values are back to normal, this problem never show up. My operating system: Windows 7 x64, SWT libraries: Eclipse IDE version: Eclipse RCP Kepler, Java: 1.6

For example, this is how I am setting the layout data of my labels:
public GridData buildENodeBTopLabelGridData() {
          eNBTopLabelGridData = new GridData(SWT.FILL, SWT.FILL, true, true);
          eNBTopLabelGridData.heightHint = 17;
          eNBTopLabelGridData.widthHint = 200;
          return eNBTopLabelGridData;

I've attached 2 pictures, one where the DPI is 100% (default) and one where DPI is 110%.

Sorry if I've made mistakes regarding the place where to ask a question or the format of my question. Thanks in advance!
Previous Topic:I need help with a code for a game
Next Topic:Difference between including project in build path and project reference
Goto Forum:

Current Time: Wed Apr 26 14:33:04 GMT 2017

Powered by FUDForum. Page generated in 0.02516 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software