home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 1021 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.8 KB  |  62 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: EU.net!sun4nl!hguijt
  3. From: hguijt@inter.NL.net (Hans Guijt)
  4. Subject: Re: Border Scrollers
  5. Message-ID: <DL5tC1.Kx1@inter.NL.net>
  6. Organization: NLnet
  7. X-Newsreader: TIN [version 1.2 PL2]
  8. Date: Sun, 14 Jan 1996 07:12:00 GMT
  9.  
  10.  
  11. >>  How do you get Gadtools Scroller type gadgets to appear in a windows
  12. >> border?
  13. >> [...]
  14. >>   The effect I'm looking for appears in loads of different programs (e.g.
  15. >> WorkBench, KingCon, Multiview etc)...
  16. >
  17. >The scroller gadgets in a window's borders are not sort of GadTools, but
  18. >BOOPSI objects. As I know there is no way to put GadTools gadgets into the
  19. >parts of a window which are 'reserved' by the system. Try using BOOPSI
  20. >instead...
  21. >
  22. >Does anyone have a different opinion?
  23.  
  24. Yeah, in the good old times (assumes a creaky voice) when there was no
  25. gadtools or intuition we used to program scrollers using only
  26. intuition.library! Try this:
  27.  
  28. (sorry, I just lifted it out of a much bigger source. Use your imagination
  29. for types etc. If anyone here is interested I could make a more detailed
  30. posting)
  31.  
  32.     GadInfo->Flags = AUTOKNOB | FREEVERT | PROPNEWLOOK | PROPBORDERLESS;
  33.     GadInfo->HorizPot = 0;
  34.     GadInfo->VertPot = 0;
  35.     GadInfo->HorizBody = MAXBODY;
  36.     GadInfo->VertBody = MAXBODY;
  37.  
  38.     Gad->LeftEdge = -Window->BorderRight + 4;
  39.     Gad->TopEdge = Window->BorderTop + 1;
  40.     Gad->Width = Window->BorderRight - 6;
  41.     Gad->Height = -Window->BorderTop - 12;
  42.  
  43.     Gad->Flags = GFLG_RELRIGHT | GFLG_RELHEIGHT;
  44.     Gad->Activation = GACT_FOLLOWMOUSE | GACT_RELVERIFY | GACT_IMMEDIATE | GACT_RIGHTBORDER;
  45.     Gad->GadgetType = GTYP_PROPGADGET;
  46.     Gad->GadgetRender = (APTR)GadImage;
  47.     Gad->SpecialInfo = (APTR)GadInfo;
  48.     Gad->GadgetID = GadID;
  49.     Gad->NextGadget = NULL;
  50.  
  51.     AddGadget (Window, Gad, -1);
  52.  
  53. This gives a gadget a scrolling gadget in the right border that looks the
  54. same as the gadgets used by workbench, kingcon, ttx, etc.
  55.  
  56.  
  57. Bye,
  58.  
  59. Hans
  60.  
  61.  
  62.