comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: color bitmap button labels
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: color bitmap button labels [message #26375] Tue, 04 September 2001 08:41 Go to next message
Martin Schultz is currently offline  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 #26386 is a reply to message #26375] Sun, 02 September 2001 21:37 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
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

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: color bitmap button labels [message #26493 is a reply to message #26375] Wed, 05 September 2001 20:03 Go to previous message
egraves is currently offline  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 [[
> [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Where is the right place to define new structs?
Next Topic: new line problems

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:36:07 PDT 2025

Total time taken to generate the page: 0.00671 seconds