Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!cs.dal.ca!aucs!840445m From: 840445m@aucs.uucp (Alan McKay) Newsgroups: comp.sys.amiga.tech Subject: String Gadget Problem (help!) Message-ID: <1990Feb22.131859.17022@aucs.uucp> Date: 22 Feb 90 13:18:59 GMT Reply-To: 840445m@aucs.UUCP (Alan McKay) Organization: School of Computer Science, Acadia Univ., Nova Scotia Lines: 90 I am having trouble with the text in string gadgets. When I draw a border around the text, the text always appears in the top left and covers up 2 sides of the border ... like this text text text text text| +-----------------------+ I know that I can fix this by specifying a border offset of -2,-2, but the problem with this is that I also use the same borders to surround text that goes into boolean gadgets. In the b. gadgets I can specify the offset of the IntuiText in the gadget to be 2,2 which is great. Is there anyway to do the same with the text in the string gadet? An alternative for me would be to keep my borders offset at -2,-2 and change the text in my boolean gadgets to be 0,0, but then the border would not truly represent the hit box of the gadget. Here are my data structures if that is of any help: SHORT const pnts_one = { 0,0, 0,10, 10,10, 10,0, 0,0 /* enough to encirle one letter of default font */ }; struct Border brdr_one = { 0,0, /* x and y offset */ 1,0,JAM1, 5, &pnts_one[0], NULL /* use default font */ }; struct StringInfo si_one = { &buff_one[0], &buff_undo[0], 1,2,0, NULL, NULL, NULL, NULL, NULL, (LONG)0, NULL }; struct Gadget gad_one = { &gad_next, x, y, w, h, GADGHCOMP, RELVERIFY | STRINGCENTER, STRGADGET, (APTR)&brdr_one, NULL, NULL, NULL, (APTR)&si_one, gid_ONE, NULL }; /* now here is the boolean gadget using same border */ struct IntuiText itext_one = { 1,0, JAM2, 2,2, /* x and y offset */ NULL, "T", NULL }; struct Gadget gad_two = { &gad_one, x, y, w, h, GADGHCOMP, GADGIMMEDIATE | TOGGLESELECT, BOOLGADGET, (APTR)&brdr_one, NULL, &itext_one, NULL, NULL, gid_TWO, NULL }; Thanks in advance for any help or insights