Relative Window Position Syntax
Posted: Wed Apr 03, 2013 8:49 pm
Hi.
I'm trying to load a window that is always at the same position RELATIVE TO the button on the window that calls it -- even if the window that calls it has been dragged to somewhere else on the screen.
I've tried 30 or 40 combinations of things that I thought might work, but anything that doesn't bomb at compile or at runtime just has no effect and the window always comes up at the same, absolute position as in its original definition.
Here's a simple version of one of the things I tried, which should give an idea of what I'm trying to do; to load the new Window at the same column and at 50 pixels below the button whose action calls it:
Function GetWindow3()
nRow := Window2.Button_1.Row +50
nCol := Window2.Button_1.Col
Load Window Window3
Row nRow
Col nCol
Activate Window Window3
Return Nil
I've tried so many versions of the syntax: "Row := nRow", "Window3.Row.Value := nCol", etc., but nothing works. I suspect that the answer is simple, but I just can't think of anything else I haven't tried and can't find anything appropriate in the samples or on any forum. Can anyone help?
Thanks.
CalScot
I'm trying to load a window that is always at the same position RELATIVE TO the button on the window that calls it -- even if the window that calls it has been dragged to somewhere else on the screen.
I've tried 30 or 40 combinations of things that I thought might work, but anything that doesn't bomb at compile or at runtime just has no effect and the window always comes up at the same, absolute position as in its original definition.
Here's a simple version of one of the things I tried, which should give an idea of what I'm trying to do; to load the new Window at the same column and at 50 pixels below the button whose action calls it:
Function GetWindow3()
nRow := Window2.Button_1.Row +50
nCol := Window2.Button_1.Col
Load Window Window3
Row nRow
Col nCol
Activate Window Window3
Return Nil
I've tried so many versions of the syntax: "Row := nRow", "Window3.Row.Value := nCol", etc., but nothing works. I suspect that the answer is simple, but I just can't think of anything else I haven't tried and can't find anything appropriate in the samples or on any forum. Can anyone help?
Thanks.
CalScot
[u]Moderator Notes[/u] (Pablo César) wrote:Topic moved from Forum en Español.