From: | Jack York |
Date: | 21 Jul 2000 at 00:50:11 |
Subject: | AmigaGuide DT help |
Hello,
I'm making another attempt at learning datatype usage and have
gotten a little farther this time. I am trying to use the amigaguide
datatype. I have two problems to start with. If I open the window
smaller than the size of the guide file and then resize the window,
the display is not refreshed. No matter what I do, the size of the
guide file is always drawn to fit the intial window size. So if I
open the window with width = 200 and resize with the sizing gadget
to 400, the guide file is still cut off at 200.
Here's what I am doing:
open the libraries and window.
open the guide with the following:
dto = NewDTObject ((APTR) guidename, DTA_NodeName, nodename,
GA_Left, win->BorderLeft,
GA_Top, win->BorderTop,
GA_Width, win->Width - win->BorderLeft - win->BorderRight,
GA_Height, win->Height - win->BorderTop - win->BorderBottom,
ICA_TARGET, ICTARGET_IDCMP,
TAG_DONE);
AddDTObject (win, NULL, dto, -1);
RefreshDTObjects (dto, win, NULL, NULL);
And second, how do I change the node being shown. I found the following
will allow me to display the contents or index of the file, but what about
a specific node? If I close everything down and re-issue the above
commands it works but that doesn't seem like the proper way to do it?
struct dtTrigger dtt;
dtt.MethodID = DTM_TRIGGER;
dtt.dtt_GInfo = NULL;
dtt.dtt_Function = STM_CONTENTS, // or STM_INDEX;
dtt.dtt_Data = NULL;
DoDTMethodA (dto, NULL, NULL, (Msg)&dtt);
Keep in mind that all of the above may not even be the correct way to
accomplish this. I couldn't find an example showing the usage of this dt
so this is just a trial and error approach.
Jack
------------------------------------------------------------------------
It's the End Of The Line for My Shipping Broker.
http://click.egroups.com/1/5175/1/_/451227/_/964137189/
------------------------------------------------------------------------