Re: color bitmap button labels [message #26375] |
Tue, 04 September 2001 08:41  |
Martin Schultz
Messages: 515 Registered: August 1997
|
Senior Member |
|
|
David Fanning <david@dfanning.com> writes:
> Ted Graves (graves@helix.mgh.harvard.edu) writes:
>
>> Does anyone know how to explicitly specify an array to be used as a
>> color bitmap button label? I know how to use CVTTOBM to convert a
>> byte array into a monochrome "bitmap byte array" (as RSI calls it)
>> that passed to WIDGET_BUTTON via the VALUE keyword. However, i can't
>> seem to find a way to extend this to a color bitmap without specifying
>> a filename in the VALUE keyword to WIDGET_BUTTON.
>>
>> The reason i ask is because i would like my code to be completely
>> self-sufficient, so that i do not have to worry about copying any
>> bitmap files when moving the code to a new platform. I've searched
>> the newsgroup and the web for an answer to this but have had no luck,
>> so i throw myself on your collective wisdom. Thanks in advance!
>
> I think you might be out of luck here. As far as
> I know, a colored bitmap MUST be read from a bitmap
> file. I usually just put my bitmap files in the same
> folder with my IDL program files. Then, when I transfer
> them to a new computer I use the extension *.* instead
> of *.pro. :-)
>
> Cheers,
>
> David
>
... but, of course, you can use David's tvread routine to produce a bitmap file
with a temporary name and use that for your button. Ugly but effective ;-)
Martin
--
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[[ Dr. Martin Schultz Max-Planck-Institut fuer Meteorologie [[
[[ Bundesstr. 55, 20146 Hamburg [[
[[ phone: +49 40 41173-308 [[
[[ fax: +49 40 41173-298 [[
[[ martin.schultz@dkrz.de [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
|
|
|
|
Re: color bitmap button labels [message #26493 is a reply to message #26375] |
Wed, 05 September 2001 20:03  |
egraves
Messages: 9 Registered: January 2000
|
Junior Member |
|
|
Thanks for the heads up ... i decided to get around it by creating a
compound widget, involving a draw widget, that returns events as if it
were a button widget. I believe i read somewhere on David's site that he
had written a routine like this in the past ... good idea David!
Ted
In article <ylw3d63t13l.fsf@faxaelven.dkrz.de>,
Martin Schultz <martin.schultz@dkrz.de> wrote:
> David Fanning <david@dfanning.com> writes:
>
>> Ted Graves (graves@helix.mgh.harvard.edu) writes:
>>
>>> Does anyone know how to explicitly specify an array to be used as a
>>> color bitmap button label? I know how to use CVTTOBM to convert a
>>> byte array into a monochrome "bitmap byte array" (as RSI calls it)
>>> that passed to WIDGET_BUTTON via the VALUE keyword. However, i can't
>>> seem to find a way to extend this to a color bitmap without specifying
>>> a filename in the VALUE keyword to WIDGET_BUTTON.
>>>
>>> The reason i ask is because i would like my code to be completely
>>> self-sufficient, so that i do not have to worry about copying any
>>> bitmap files when moving the code to a new platform. I've searched
>>> the newsgroup and the web for an answer to this but have had no luck,
>>> so i throw myself on your collective wisdom. Thanks in advance!
>>
>> I think you might be out of luck here. As far as
>> I know, a colored bitmap MUST be read from a bitmap
>> file. I usually just put my bitmap files in the same
>> folder with my IDL program files. Then, when I transfer
>> them to a new computer I use the extension *.* instead
>> of *.pro. :-)
>>
>> Cheers,
>>
>> David
>>
>
> ... but, of course, you can use David's tvread routine to produce a bitmap file
> with a temporary name and use that for your button. Ugly but effective ;-)
>
> Martin
>
> --
> [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
> [[ Dr. Martin Schultz Max-Planck-Institut fuer Meteorologie [[
> [[ Bundesstr. 55, 20146 Hamburg [[
> [[ phone: +49 40 41173-308 [[
> [[ fax: +49 40 41173-298 [[
> [[ martin.schultz@dkrz.de [[
> [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
|
|
|