I went through the GRASS 5.4 source code and looked at all the bwidget demo
files and tried all permutations of LabelFrame from there. It all comes out
the same on my Mac with x11. I don't know what is up, but I can't get a
border to show up no matter what I do. Maybe it does in 8.3 but not in 8.4.
Maybe it's something else in the v.digit code.
I guess just add -bg honeydew2 to the options and call it good. This looks
border.
Date: Sun, 08 Oct 2006 12:16:43 -0700
Conversation: [GRASS-dev] Re: tcltk 8.3 and v.digit toolbox
Subject: Re: [GRASS-dev] Re: tcltk 8.3 and v.digit toolbox
Still catching up with a lot of traffic over past 24 hours.
I'll look at the demo file, but giving the frame a honeydew background is a
good substitute if that fails.
We already use bwidgets for most of the widgets listed below. Only in a few
cases (generally noted in the bwidgets docs) have there been new tk widgets
that supercede these. The more complicated issue is changes to existing TclTk
widgets and other syntax. This is only a gism issue as you point out. It's not
that substitutes can't be found or worked out, it's just that I don't have
much in the way of time to do it, and it's additionally difficult since I'm
running 8.4--as are most people who can test. I've already had to put wxGRASS
aside for a month (and am already forgetting what I learned this past summer)
while doing necessary bug fixes on TclTk 8.4 code for 6.2 and 6.3. So I'm not
against it as long as it doesn't degrade the UI, I just don't want to be the
person who has to make gism work with 8.3.
On the other hand, as you note, v.digit needs to work with both old and new
GUI. So as long as we maintain d.m, I agree that v.digit should be backward
compatible. So let's get this one set and see what happens next.
Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University
phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton
Date: Sun, 8 Oct 2006 22:03:34 +1300
Subject: [GRASS-dev] Re: tcltk 8.3 and v.digit toolbox
It turns out that bwidget LabelFrame is not just a drop in replacement
for the tk 8.4 labelframe. For one thing, LabelFrame seems buggy in
the version of bwidgets that GRASS uses and the frame border will not
draw with a label there. Second the options are slightly different.
Yes, I can't get a frame border either. Thanks for translating the options.
There are (Very Good) bwidget instructions and demo.tcl in the GRASS 5
source code. (hopefully you found them?)
[should we copy into GRASS 6 lib/external/bwidget?
252K demo/
368K BWman/
]
cd grass-5.4.0/src/libes/bwidget/demo/
wish demo.tcl
in the demo the LabelFrames borders work correctly, so I think it is
something we are overlooking (???).
If you want to replace the labelframe statement in toolbox.tcl (ca.
Line 223) with the following and see what happens,
I do want to replace it for 6.2,
On my Mac, running x11, it creates the label but does not draw the
box, no matter what I do. This is problematic, but maybe it at least
runs on 8.3.
As it works in demo/demo.tcl, I think it's a fixable bug on our behalf.
( somewhere :-/ window parent/child relationship? lack of content?)
Again, I can't say if there are any other 8.4 features that won't run
on 8.3, so I'm not sure it's worth it anyway.
.. but but but .. are there bwidget replacements for those we can use?
=== (lib/external/bwidget/README.grass) ========
only requires 2 lines of code in your Tcl/Tk script to use the new widgets.
Some of the new widgets include
On mouse over help balloons
Tabbed notebook panes - like worksheets in Excel
Directory tree listing
Combination box or drop down option list
Progress bar
Many others
================================================
seems to me that there should be replacements, and we don't (really)
have to worry about finding any we don't know about until we get an
error report. And then it's a (hopefully) quick fix. We are pretty
sure this is the only v.digit problem, and pretty sure that d.m is ok
(so I'm not as worried about gis.m).
LabelFrame .bpf -bd 1 -relief groove -side top -anchor n \
-text [G_msg "mouse button actions (left, right, center)"]
works for me (besides missing border). I expect it will work on all
platforms (I can't see why it wouldn't).
An immediate solution: adding "-background HoneyDew" makes the
"-relief groove -borderwidth 1" failure less important.
thanks,
Hamish