Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!caen!zaphod.mps.ohio-state.edu!ub!uhura.cc.rochester.edu!rochester!kodak!ispd-newsserver!ism.isc.com!ico!attc!marbru From: marbru@attc.UUCP (Martin Brunecky) Newsgroups: comp.windows.x.motif Subject: Re: Adding borders to Motif'ized Table Widget Message-ID: <1039@attc.UUCP> Date: 4 Feb 91 17:09:27 GMT References: <4@oriel.UUCP> Reply-To: marbru@auto-trol.UUCP (Martin Brunecky) Organization: Auto-trol Technology, Denver Lines: 48 In article <4@oriel.UUCP> gardner@oriel.ww.com (Phillip E. Gardner) writes: >I got a version of the Table widget from Kee Hinckley. This version >works great with Motif! I am wandering how I ever lived without it! > >I would like to extend it so that it provides borders around the >cells. For my needs, I only need it to either put a single-line >border around EVERY cell or to not put ANY borders. Implementing >something as fancy as occurs in Microsoft's Word (Mac) would be >better, however. > >Before I spend much time doing this, I thought it would be best to >ask for ideas. If you have any ideas, please let me know. > You can have borders if you use Widgets: table*borderWidth: 1 table.borderWidth: 0 However, IF you are using Motif Gadgets, you have a problem: Motif gadgets do NOT support border ! I *think* OSF is looking into this. If they DO FIX gadgets, then there is NOTHING to do with the Table widget. If they don't fix Motif .... I am principally oposed to making widgets DO things that they don't have to. For example all those Motif resources like XmNentryBorder are a big bullshit. Using resource files properly, you can get the same result WITHOUT an explicit code in the widget. Thus the XmNentryBorder resource is redundant, useless and only unnnecessarily making a widget overly complex. (note thet even using XmNentryBorder in Motif manager does not create a border around a gadget ). Back to your suggestion. If you want some more fancy border, such as Motif 3D outlines, I believe that the RIGHT way to do it is either using outlines built into components, or implementing a lightweight composite BorderWidget (unfortunatelly, R4 got rid of a composite object - we could have a BorderGadget ). But I'd leave the Tab widget to do geometry management, not graphics. Though this is just my opinion... -- =*= Opinions presented here are solely of my own and not those of Auto-trol =*= Martin Brunecky {...}sunpeaks!auto-trol!marbru (303) 252-2499 (sometimes also: marbru@auto-trol.COM ) Auto-trol Technology Corp. 12500 North Washington St., Denver, CO 80241-2404