Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
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
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 [[ [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
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 [[ > [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[