realbasic-nug
[Top] [All Lists]

Re: Window.Left and WIndow.Top incorrect

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: Window.Left and WIndow.Top incorrect
From: Michael Diehr <md03@xochi.com>
Date: Tue, 28 Jul 2009 20:32:22 -0700
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <048D0EFB-D608-4802-99E5-46187B30F447@stretchedout.com>
References: <048D0EFB-D608-4802-99E5-46187B30F447@stretchedout.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
On Jul 28, 2009, at 7:16 PM, Greg O'Lone wrote:

I'm attempting to create an autocomplete menu for an editfield (2009r2.1) that appears at the text insertion point and having a problem with the placement of the menu. It seems that when I call TrueWindow.Left and TrueWindow.Top from a subclass of an editfield, I am not getting the coordinates of the window, but the window behind it.

Mac OSX 10.5.7 -> Windows Vista SP1 (also a problem on XP)

AutocompleteField (Subclass of Editfield)
on a TabPanel
on a Document Window
in front of another document window
inside an MDI window

So what I'm attempting to do is to position another window with a listbox on it at the cursor position within the AutocompleteField. Problem is that TrueWindow.left and TrueWindow.Top are returning the top-left corner of the window BEHIND the top window.

Anyone seen something like this before?

A guess -- perhaps in a MDI app, trueWindow returns the MDI window?

Any reason you can't just do this:

triggerAutoComplete
  dim x,y as integer
  x = me.left
  y = me.top
  // figure out global coordinates
  x = x + self.left
  y = y + self.top
?


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>