[net.micro.amiga] Adding Gadgets to the Top Border

pxd@aber-cs.UUCP (07/29/86)

References:
Xpath: ukc eagle

I am having problems with adding gadgets to the top border
of a window. If the window does not have WINDOWDRAG set, there
is no problem, but if WINDOWDRAG is set the gadget comes up
looking as if it is disabled and whenever I try to select it
all that happens is that the window is dragged about. This
happens under 1.1 and 1.2(beta 5).

Can anybody throw any light on this. All the demos I have seen on this
subject leave TOPBORDER alone.
-- 
UUCP : { ENGLAND or WALES }!ukc!aber-cs!jjs
JANET: jjs@uk.ac.aber.cs           PHONE:    +44 970 3111 x 3388	
Post: University College of Wales, Penglais, Aberystwyth, UK, SY23 3BZ.

higgin@cbmvax.cbm.UUCP (Paul Higginbottom) (08/03/86)

In article <494@aber-cs.UUCP> jjs@aber-cs.UUCP (John Jones-Steele) writes:
>References:
>Xpath: ukc eagle
>
>I am having problems with adding gadgets to the top border
>of a window. If the window does not have WINDOWDRAG set, there
>is no problem, but if WINDOWDRAG is set the gadget comes up
>looking as if it is disabled and whenever I try to select it
>all that happens is that the window is dragged about. This
>happens under 1.1 and 1.2(beta 5).
>
>Can anybody throw any light on this. All the demos I have seen on this
>subject leave TOPBORDER alone.
>-- 
>UUCP : { ENGLAND or WALES }!ukc!aber-cs!jjs
>JANET: jjs@uk.ac.aber.cs           PHONE:    +44 970 3111 x 3388	
>Post: University College of Wales, Penglais, Aberystwyth, UK, SY23 3BZ.

Here's the trick - Add the gadgets after the window is opened at the
FRONT of the list.  You need to do this because Intuition's own
gadgets (e.g. invisible drag gadget) will take precedence over yours
because they're nearer to the front of the list (until you add yours
at the front).  So use the AddGadget routine with position of 0,
and you will also need to do a RefreshGadgets() once you've added it.
I've done this, and it works.

Hope this helps,
		Paul Higginbottom.

Disclaimer: I do not work for Commodore, my opinions are my own, and I
probably won't be around to see any replies.

jimm@amiga.UUCP (James D. Mackraz) (08/04/86)

In article <494@aber-cs.UUCP> jjs@aber-cs.UUCP (John Jones-Steele) writes:
>References:
>Xpath: ukc eagle
>
>I am having problems with adding gadgets to the top border
>of a window. If the window does not have WINDOWDRAG set, there
>is no problem, but if WINDOWDRAG is set the gadget comes up
>looking as if it is disabled and whenever I try to select it
>all that happens is that the window is dragged about. This
>happens under 1.1 and 1.2(beta 5).
>
>Can anybody throw any light on this. All the demos I have seen on this
>subject leave TOPBORDER alone.

I don't have a demo for you, but you are probably not doing the necessary 
voodoo to get your gadget to precede the system drag gadget in the 
gadget list (gadgets select from from to back, head to tail in the
gadget list).  To do this, you must AddGadget() explicity, it cannot
be gotten by the FirstGadget field in the NewWindow.  Try setting the
'position' parameter in AddGadget to 0.

Be sure also to set the TOPBORDER activation flag in the gadget.

Top border gadgets have always been a little weird, esp. when the window is
made active/inactive.  They may still be a little weird.  Good lucks.

		jimm	Commodore-Amiga