You beat me to the email
I just got it:
int scrolldistance =
((ScrollPane)textInput.getParent().getParent()).getScrollTop();
Bounds ti_bounds = textInput.getBounds();
popup.open(textInput.getDisplay(), ti_bounds.x, ti_bounds.y+
ti_bounds.height + 45-scrolldistance);
"45" is my static "adjustment"
Perfect.
BTW, these textinputs are on a form that is generated by SOLR with XSLT.
All I have to do is call the URL and add a Form.Section to my Form that's
declared ahead-of-time. I created a custom SOLR search component that
generates a list of indexed fields and then an XSLT that wraps it in WTKX,
so anytime we change the schema of the index or another dynamic field is
added, the form adjusts automatically. To me, that's the real power of
PIVOT. Being able to build GUI components on the server and populated it
with data and simple adding it to a parent GUI container. Sweet stuff.
If I use JavaStart, do I have to sign the jars when using the @WTKX binding?
Bob
On Thu, Mar 25, 2010 at 8:44 AM, Todd Volkert <[email protected]> wrote:
> The scrolled distance is a property of the ScrollPane (getScrollTop()), so
> you can get it, but I'm wondering if you can send some small sample code --
> mapPointToAncestor() should have worked, so if you send a sample, I'll take
> a look and see if there's an easier way...
>
> -T
>
> On Thu, Mar 25, 2010 at 9:38 AM, Robert Piotrowski <[email protected]
> > wrote:
>
>> I tried mapping to display and also tried parent, parent/parent,
>> parent/parent/parent etc.
>>
>> It's not linear so I can't "adjust" the x&y coordinates for the popup with
>> something like x+100 or x-150, etc.
>>
>> Getting the bounds of the textinput and subtracting the scrolled distance
>> would do the trick. I just need to get that scrolled distance. Is that
>> even possible, or is that handled by the skin and out of reach from the
>> TextInput object?
>>
>>
>>
>> Bob
>>
>>
>>
>> On Wed, Mar 24, 2010 at 3:52 PM, Greg Brown <[email protected]> wrote:
>>
>>> > Should the ancestor be something else? I used the top window on the
>>> display because that is the window that opens the popup.
>>>
>>> I generally use the display, because window location (including your
>>> popup) is relative to the display.
>>>
>>>
>>
>