#gadgets
9 messages in this thread
I would like to add a gadget to the window and then remove it when no
longer needed. Do I have to struggle with AddGadget to do this? Would it be
easier to make a small requester that looks like a gadget?/exit
Creating a requester is a lot more work than a gadget.
Simply AddGadget() then RemoveGadget() when done.
I tried that but it crashed, thought maybe that wasn't its purpose. Will
have to check the code over carefully. Thanks Steve.
If you're adding a gadget in when there are other gadgets present, you have
to be real careful of how you remove the gadget and relink the gadget list.
It's a fairly simple operation, but if you aren't real careful, you'll
visit the turbuned one a lot!
Yah, been doing that a lot. Decided to just leave it in there. Is there a
way to cycle the colors of a BOOL gadget on each select?
Steven,
I'm not really sure what you're asking. A BOOL gadget, by definition, is
either ON or OFF. When you click on it, it becomes ON (or TRUE) and you
take some action. When you release the click (depending on how you set
GADIMMEDIATE and RELVERIFY, of course) it is no longer true (and your
program may or may not take some action in reference to its non-TRUE
state).
From your question, it seems to me that what you really want to use is a
(2.0) CYCLE_KIND gadget or possibly a CHECKBOX_KIND gadget.
-sja
I need the autodoc to use CYCLE_KIND. I'm using SAS5.10a which has 2.0
header files but if it has the autodocs for the new features, I can't find
them. What I'm trying to do is cycle between four colors as an indication
of what mode has been picked. What changes color doesn't matter. There is
an Image in the window which would be a good thing to change the color of
but I don't want to get into graphic primitives. Instead I've set up four
Images exactly the same except for color, then turn them on or off with
AddGadget ect. This is a pain and there's gotta be a better way. Any ideas?
Steven,
I just modified an old standby test program of mine "swindow.c" and
have uploaded it to library 5 here in AmigaTech. It will be public around
11PM PST tonight. The program does several things and now 'cycles' the
colors of two BOOL gadgets through the 4 colors on the WB each time the
window in which they are is 'ACTIVATED'. I hope this is of some use to
you. Oh, the relevant lines are 457&458 (not a LOT of work needs doing
smmiiille>).
Thanks a lot for your help, Vic.
\exit