Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!computer-science.birmingham.ac.UK!RiddCJ From: RiddCJ@computer-science.birmingham.ac.UK (Chris Ridd) Newsgroups: comp.sys.atari.st Subject: Re: How do I add a window to a form? Message-ID: <9001101011.aa01318@benjamin.Cs.Bham.AC.UK> Date: 10 Jan 90 10:11:23 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 39 Paul Close asked (paraphrased): 1) how do I put a scrollbar in a form (dialog) like the file selector? 2) how do I write inside a window? 1) Well, you CAN'T put a window inside a dialog box. What you can do though, is simulate a window's scrollbars and features by drawing little buttons (hint - use G_BOXCHARs for the scroll arrows) and boxes (the scrollbar background should be a G_BOX with a fill pattern, the little moveable box (thumb) should be a child of this object, and should also be a G_BOX, filled in white). Play around with a good resource editor (K-Resource or WERCS spring to mind). All the objects should have the TOUCHEXIT flag turned on, so that a mouse click will 'repeat'. You'll need a little bit of code to handle all the different click positions - on the thumb (drag the box), on the background (page the thumb up or down), or just scrolling line by line up or down. You don't need to use G_PROGDEF types. 2) You can write inside a window just by writing on the screen at the proper coordinates. To ensure that you don't destroy the screen outside the window, clip the VDI output to inside the window's work area. There is no other way. There are alas, no extra window functions inside the AES that will help you do clever things. You need to work hard! After a bit, you get to admire the work that's gone into packages like NeoDesk (custom windows) et al. >Paul Close paul@cacilj.CTS.COM ...!{uunet, ucsd, crash}!cacilj!paul > > The Obi-wan Kenobi method: "Use the Source, Luke" -Jim Fulton Chris /* * Snail mail address: * Chris Ridd, "Wave after wave, each mightier than the last * School of Computer Science, 'Til last, a ninth one, gathering half the deep * Birmingham University, And full of voices, slowly rose and plunged * UK Roaring, and all the wave was in a flame" * */