View Full Version : toggle visibility of objects - how???
just4fun2k7
02-22-2007, 02:47 AM
hi,
got a general problem, i couldnt clear by myself...
often i wanna make an image, which works as a switch for visibility -
but dont know how.... :rolleyes
for example:
-image "X" should get visible, if i enter hotspot "A"
-image "X" should get invisible, if i leave hotspot "A"
-image "X" should stay visible, when i click hotspot "A"
-image "X" should get invisible again, when i click hotspot "A" again (was already clicked 1 time) ...
...and so on....
hope i explained good enough to follow,
cause my english istn the best :rolleyes
i would be very happy, if anybody can tell me how to do it. :)
thx :yes
just4fun2k7
First thing is that you can do all of this with the image object alone (no hotspot object should be needed).
Put this code in the "On Show" event for your page:
-- Setup a variable with the name of the image object
str_ImageName = "Image1";
-- Ensure that the image is invisible
Image.SetVisible(str_ImageName, false);
-- Setup a boolean that help us control the result of clicks on the image
bln_StickyVisible = false;
Put this code in the "On Enter" event for your image object
-- check to see if the image is invisible and if so, make visible
if not Image.IsVisible(str_ImageName) then
Image.SetVisible(str_ImageName, true);
end
Put this code in the "On Leave" event for your image object
-- Check to see if the image has been clicked to stay visible and
-- if not make invisible
if not bln_StickyVisible then
Image.SetVisible(str_ImageName, false);
end
Put this code in the "On Click" event for your image object
-- Toggle to the StickyVisible boolean
if bln_StickyVisible then
bln_StickyVisible = false;
else
bln_StickyVisible = true;
end
mwreyf1
02-22-2007, 09:22 AM
And yet another way.
just4fun2k7
02-23-2007, 01:03 AM
hey :yes
thanx for the support! ill have a look on your suggestions...
another small question from me, i cant handle now:
how can i make it, that just 1 specific page of my project is
"always on top"?
thx a lot again! :yes :yes :yes
just4fun2k7
Not sure I understand the question... If you never jump to another page, then the one you start with will always be on top.
... but if you only ever want 1 page to be on top, why would you have other pages?
just4fun2k7
02-24-2007, 08:31 AM
here's the reason for my wish:
on some pages of my projekt different applications (exe) can be started...
...and some of them are fullscreen.
and to be able to see one specific page of the projekt then,
ill need to do that.
would be great, if its possible anyway.
thx for the great help & support! :yes :yes
greetz
just4fun2k7
RizlaUK
02-24-2007, 10:39 AM
easy,
in the page you want to be ontop, put this in the page onshow event
Window.SetOrder(Application.GetWndHandle(), HWND_TOPMOST);
and in every other page put,
Window.SetOrder(Application.GetWndHandle(), HWND_NOTOPMOST);
just4fun2k7
02-27-2007, 03:15 AM
thanx, ill try all the tips. :cool
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.