Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Releasing form from Toolbar - form hangs

Status
Not open for further replies.

TomLeMes

MIS
Mar 19, 2004
96
GB
Reposting in the correct forum - sorry 'bout that!

I have a form with a custom toolbar (created as a custom property of the form):
Code:
THISFORM.objTool = CREATEOBJECT('ToolBar_main')
see thread184-1124665.

One of the buttons on my toolbar is the close button that should close down the form. It does this using:
Code:
IF TYPE('_SCREEN.activeform.name') = 'C' then
    _SCREEN.activeform.release()
ENDIF
This same syntax works fine for running other methods of the form. However, when I click the button the form that I am trying to release hangs. By that I mean the form remains on the screen but frozen and blanked.

There is also a button on the form itself that does a thisform.release and that works fine. I have tried to set the the toolbar object reference to false on the form as part of the release event but this doesn't help. Any ideas?
 
Seems that the problem was that the toolbar was still docked to the form it was trying to release. When I put in a
Code:
Toolbar.dock(-1)
and then continue as before everything is fine!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top