Open and CloseDisplay() question....

Find quick help here to get you started with Hollywood
Post Reply
User avatar
Tuxedo
Posts: 338
Joined: Sun Feb 14, 2010 12:41 pm

Open and CloseDisplay() question....

Post by Tuxedo »

Hi ALL!

In my program I've code that create, write on, and open a display to show some infos...
Since now no peobs but...
When I go to close the new display with the close gadget it will close all the program...
I've installed an event handler to check for "CloseWindow" but it was triggerd only when I close the main display...
It seems to me really weird...any idea on what I miss?

my code was:

CreateDisplay(2, { Width = 350, Height = 170, Color = $F0F0F0, NoHide = TRUE, Hidden = TRUE, Title = "Info file", Sizeable = FALSE }) ; Creo il mio Display che conterrà i dati Exif

SelectDisplay(2)

LOCAL q = 0

FOR LOCAL TAGPos = 1 TO 14
IF (TAGName[TAGPos] <> "") AND (ToString(TAGVAlue[TAGPos]) <> "99") AND (ToString(TAGVAlue[TAGPos]) <> "0")
TextOut(1, (1+((TAGPos-1-q)*12)), TAGName[TAGPos])
TextOut(88, (1+((TAGPos-1-q)*12)), TAGValue[TAGPos] .. "\n")
ELSE
q = q + 1
EndIF
NEXT

EndSelect()

OpenDisplay(2)

Really dunno what I made wrong...sorry!

Thank all for help!
Simone"Tuxedo"Monsignori, Perugia, ITALY.
User avatar
Allanon
Posts: 732
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

Re: Open and CloseDisplay() question....

Post by Allanon »

Try installing the event handler on close window event when the Display 2 is active, in this way you will attach the event handler to the display 2, many events works in this way, like for the resize event and the move event.
This way you can "trap" the close event in your function and you can manually close the display or make whatever you want :)

Greets,
Fabio
User avatar
Tuxedo
Posts: 338
Joined: Sun Feb 14, 2010 12:41 pm

Re: Open and CloseDisplay() question....

Post by Tuxedo »

Thank you!
Now all works pretty well and I LOVE that new windows!
Was really "proof" now to have more than one window opened togheter and that works togheter :)
Simone"Tuxedo"Monsignori, Perugia, ITALY.
Post Reply