On Apr 22, 11:43 am, rhyme2ri2 <rhyme2...@[EMAIL PROTECTED]
> wrote:
> On Apr 15, 2:18 am, Spon <christoph.b...@[EMAIL PROTECTED]
> wrote:
>
>
>
> > On Apr 14, 8:29 pm, Bob Crawford <Snowma...@[EMAIL PROTECTED]
> wrote:
>
> > > On Apr 11, 10:38 am, Spon <christoph.b...@[EMAIL PROTECTED]
> wrote:
>
> > > > On Apr 11, 3:26 pm, Spon <christoph.b...@[EMAIL PROTECTED]
> wrote:
>
> > > > > On Apr 11, 12:56 pm, rhyme2ri2 <rhyme2...@[EMAIL PROTECTED]
> wrote:
>
> > > > > > Hello all,
>
> > > > > > A very simple thing i'm trying to do but somehow i'm stuck
with it....
> > > > > > I want a bitmapped button. For this i'm using following :
>
> > > > > > cmddownloadall = Widget_Button(pradar, UNAME='cmddownloadall'
$
> > > > > > ,XOFFSET=800 ,YOFFSET=100 ,SCR_XSIZE=30 ,SCR_YSIZE=24 $
> > > > > > ,/ALIGN_CENTER,TOOLTIP='Download All files' $
> > > > > > ,VALUE='downloadall.bmp' ,sensitive=0,frame=1,/BITMAP)
>
> > > > > > Well this is it and i'm not able to get the image button.
Issues like
> > > > > > checking the availability of file or trying to provide the
full path
> > > > > > name of image file are already addressed by me :)
> > > > > > Image is a 24-bit bitmap.
>
> > > > > > What it shows is just a blank button with the frame or
sometimes just
> > > > > > the text written in value..(strange but true)
>
> > > > > > Can any one point out where m i wrong??
>
> > > > > > Thanks & Regards
> > > > > > -Ritu
>
> > > > > Using IDL v6.4 on Windows XP Pro, I can duplicate your problem.
It
> > > > > goes away when I set sensitivity = 1
> > > > > I guess it might be a bug.
> > > > > Can anyone else verify this?
>
> > > > > Regards,
> > > > > Chris
>
> > > > Looking at it again, it may even be a Feature. I can merrily show
and
> > > > hide the bitmap at will if I stick in a second button that
switches
> > > > the sensitivity of the bitmap button on and off.- Hide quoted text
-
>
> > > > - Show quoted text -
>
> > > On my system at least 'c:\windows\coffee bean.bmp' is an 8-bit
> > > bitmap.
>
> > > Using a 24-bit version has a slightly different effect, rather than
> > > hiding the whole image the color appears to be turned on/off.
>
> > Hi Bob,
>
> > Yes, I should've picked a 24-bit file, I guess.
> > I've tried that now, and yes, with a 24-bit file you can always tell
> > the bitmaps's there even when the button isn't active. It may be grey,
> > but it's not invisible, like with 8-bit ones.
>
> > According to the helpfile, the bottom left hand pixel's value gets
> > designated the 'background' value in 24-bit pixels, and becomes see-
> > through. I'm not sure how this affects how it's displayed in its
> > 'greyed-out' state, maybe it just averages across the r,g,b colour
> > values for every point or something.
>
> > > BTW Using your example code the image is visible when the button is
> > > labelled "On". Isn't that sensitivity = 1?
>
> > Yes. The whole point of my example code was to show that I can toggle
> > bitmap visibility by toggling button sensitivity. :-)
> > It's what convinced me that the effect was a feature, not a bug.
>
> Yup........After a lot of struggle with the issue, finally i'm
> successful in getting the image on button. But the solution is of
> great surprise to me :|
>
> What i found was the base widget in which i was trying to put the
> image button had SCROLL on.
> When i unset the scroll then i'm able to see the bitmapped image
> button. Yup this seems to be a wierd solution to the problem.
>
> I Would like to know the crux behind this functionality. How can the
> scroll position of base widget affect the display of bitmap in button
> widget???????????? ( or is this a bug.....?)
>
> I'v IDL 6.3
>
> Regards
> -Ritu
You can get around this by creating a child base to the base with /
SCROLL on, and making this child the parent of your button widget.
Although I'm guessing it'll make it even more tricky to get the
overall widget geometry to behave >:-(
Yup, looks like a bug to me. Or at least a restriction that should be
mentioned in the documentation, given that the work-around isn't
*that* complicated.
Well done on spotting it, sounds like a headache and a half to pick
apart...
Cheers,
Chris


|