Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > Re: Problems wi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 14 Topic 5633 of 5734
Post > Topic >>

Re: Problems with bitmapped button widget

by Spon <christoph.blau@[EMAIL PROTECTED] > Apr 11, 2008 at 08:01 AM

On Apr 11, 3:43 pm, David Fanning <n...@[EMAIL PROTECTED]
> wrote:
> Spon writes:
> > 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?
>
> I can't duplicate it. Do you have an example program?
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Sure thing, here it is:

-----
pro testbuttonwidget_event, event
  print, 'button press detected.'
end

pro testbuttonwidget_switch, event
  widget_control, event.top, get_uvalue = uval
  uval.state = (uval.state + 1) MOD 2
  widget_control, uval.butn, sensitive = uval.state
  if uval.state eq 0 then switchvalue = 'Off' $
    else switchvalue = 'On'
  widget_control, uval.turn, set_value = switchvalue
  widget_control, event.top, set_uvalue = uval
end

pro testbuttonwidget_quit, event
  widget_control, event.top, /destroy
end

pro testbuttonwidget, debug = debug

file = 'c:\windows\coffee bean.bmp'

check = query_bmp(file, debug)
if check ne 1 then message, 'Not a bitmap.'

base = widget_base(/col)
butn = widget_button(base, xoffset = 80, $
  yoffset = 80, scr_xsize = 64, scr_ysize = $
  64, /align_center, tooltip = 'Download all files', $
  value = file, sensitive = 0, frame = 1, /bitmap)
turn = widget_button(base, value = 'Off', $
  event_pro = 'testbuttonwidget_switch')
exit = widget_button(base, value = 'Quit', $
  event_pro = 'testbuttonwidget_quit')
widget_control, base, /realize
uval = {butn:butn, turn:turn, state:0}
widget_control, base, set_uvalue = uval
xmanager, 'testbuttonwidget', base, /no_block

return
end

-----




 14 Posts in Topic:
Problems with bitmapped button widget
rhyme2ri2 <rhyme2ri2@[  2008-04-11 04:56:13 
Re: Problems with bitmapped button widget
David Fanning <news@[E  2008-04-11 06:18:25 
Re: Problems with bitmapped button widget
Spon <christoph.blau@[  2008-04-11 07:26:56 
Re: Problems with bitmapped button widget
David Fanning <news@[E  2008-04-11 08:43:39 
Re: Problems with bitmapped button widget
Spon <christoph.blau@[  2008-04-11 07:38:29 
Re: Problems with bitmapped button widget
Spon <christoph.blau@[  2008-04-11 08:01:36 
Re: Problems with bitmapped button widget
rhyme2ri2 <rhyme2ri2@[  2008-04-12 13:39:39 
Re: Problems with bitmapped button widget
Spon <christoph.blau@[  2008-04-14 01:25:13 
Re: Problems with bitmapped button widget
Bob Crawford <Snowman4  2008-04-14 12:29:03 
Re: Problems with bitmapped button widget
Spon <christoph.blau@[  2008-04-14 14:18:31 
Re: Problems with bitmapped button widget
rhyme2ri2 <rhyme2ri2@[  2008-04-22 03:43:16 
Re: Problems with bitmapped button widget
David Fanning <news@[E  2008-04-22 06:31:56 
Re: Problems with bitmapped button widget
Spon <christoph.blau@[  2008-04-22 06:28:45 
Re: Problems with bitmapped button widget
David Fanning <news@[E  2008-04-22 07:33:32 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri May 16 9:55:30 CDT 2008.