[[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]]
==== Positioning Dialog boxes (OpenInsight Specific) ====
=== At 31 MAY 2001 07:10:39PM b cameron wrote: ===
{{tag>"OpenInsight Specific"}}
How can I position a dialog box directly under/above an editline or
drop downlist?
On date fields I use a button to launch the POPUP_MONTH form using
dialog_box(...). I would like create a SP that gets the top and bottom of the current control and passes either to launch the dialog box.
Thanks
----
=== At 31 MAY 2001 07:52PM Donald Bakke wrote: ===
Bruce,
Popup_Month should automatically position itself correctly above or below your editline. Create an OPTIONS event for the editline that calls Popup_Month using the Dialog_Box() routine and then have your button call the OPTIONS event of this editline.
dbakke@srpcs.com
[url=http://www.srpcs.com]SRP Computer Solutions, Inc.[/url]
[img]http://www.srpcs.com/srpicon1.gif[/img]
----
=== At 01 JUN 2001 02:20PM b cameron wrote: ===
Don,
Excuse my ignorance here. Will this do it?
1) I the OPTIONS event for the N_DATE control I put...
GetDate=Dialog_Box('POPUP_MONTH',@Window,'')
If Len(GetDate) Then
getdate=OCONV(GetDate,"D4/")
Call Set_Property(@WINDOW:".N_DATE","TEXT",getdate)
End
RETURN 0
2) In the CLICK event for my calendar button
Call Send_Event(@WINDOW:".N_DATE","OPTIONS")
RETURN 0
bc
----
=== At 01 JUN 2001 07:25PM Donald Bakke wrote: ===
Bruce,
That's basically it. However, you only need to set a QuickEvent to call POPUP_MONTH. The code that supports POPUP_MONTH automatically updates your control with any selected date.
dbakke@srpcs.com
[url=http://www.srpcs.com]SRP Computer Solutions, Inc.[/url]
[img]http://www.srpcs.com/srpicon1.gif[/img]
----
=== At 02 JUN 2001 01:00PM b cameron wrote: ===
It works fine but the calendar is still positioned at the top left of the window. Do I need to pass some parameters?
----
=== At 02 JUN 2001 03:02PM b cameron wrote: ===
I took a look at the SSP for popup_month. I'm not sure
why it it positioning itself to the top left corner of the
form but I can probably do what the code is doing to get
it in the right spot.
Thanks Don.
----
=== At 03 JUN 2001 07:46PM Barry Stevens wrote: ===
You have to use the method advised by don.
When call ed using your code, the routine does not know the control it is being called from, hense befaults to the current window.
Barry
[[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=9BA39B469520A42C85256A5D007F518E|View this thread on the forum...]]