Question

I've created some customized bitmap images (.gif files) for buttons (in my case a ButtonBox), similar to the ones found in the bwidget-/images directory and stored them there.

I would, however, like to use the standard installed BWidget version.

Is it possible to store the images in another location and indicate to BWidget where to look?

From the source, it looks like you need to add a new path to the BWIDGET::LIBRARY variable but I couldn't find a function to do it.

Was it helpful?

Solution

The BWidget code is designed to be extended (it's formally dual-licensed: Tcl-style BSD and LGPL) and the BWIDGET::LIBRARY variable is set in the standard package index script to be the location where the code is installed. Since a number of other things also depend on that variable, your best bet is to just copy the whole library, make your changes, and distribute the changed version as part of your app. This isn't particularly onerous; as code goes, BWidget doesn't change very often and it's relatively small too (half a megabyte of code before compression, plus about 14kB of support files).

It's not a perfect solution, but it's definitely easiest.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top