Offset not calculated properly

  • Thread starter Craig L. Taylor
  • Start date
C

Craig L. Taylor

I'm trying to move a second window so that it is directly above another,
hugging it closely. I'm using the below code, but for some reason, its not
always consistent.. sometimes my second window falls just below the title
bar, sometimes its pretty far below the title bar.

void resetPositionComboTD()
{
Point loc = this.getLocationOnScreen();

int newY = loc.y - sw.getHeight();
int newX = loc.x;

sw.setLocation(newX, newY);
}

I tried playing with insets, but no matter what I did, it didn't seem to
help much (or at all)

Any help is appreciated, I'm driving my self nuts with this

- Craig


#! rnews 572
Xref: xyzzy rec.autos.makers.mazda.miata:150315
Newsgroups: rec.autos.makers.mazda.miata
Path: xyzzy!nntp
From: "Xavier" <[email protected]>
Subject: Any Mazda3 owners around here?
X-Nntp-Posting-Host: e165148.nw.nos.boeing.com
Message-ID: <[email protected]>
X-Mimeole: Produced By Microsoft MimeOLE V6.00.2800.1441
X-Priority: 3
X-Msmail-Priority: Normal
Lines: 3
Sender: (e-mail address removed) (Boeing NNTP News Access)
Organization: The Boeing Company
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
Date: Fri, 4 Mar 2005 00:15:29 GMT

Great car...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,190
Latest member
ClayE7480

Latest Threads

Top