# Accessing fxruby widget from another class

**URL:** <https://www.ruby-forum.com/t/accessing-fxruby-widget-from-another-class/193964>\
**Category:** FXRuby\
**Created:** [August 27, 2010, 9:10am UTC](https://www.ruby-forum.com/t/accessing-fxruby-widget-from-another-class/193964 "2010-08-27T09:10:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![paradise](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/8e7dd6/32.png) [@paradise](https://www.ruby-forum.com/u/paradise)\
**Post date:** [August 27, 2010, 9:10am UTC](https://www.ruby-forum.com/t/accessing-fxruby-widget-from-another-class/193964/1 "2010-08-27T09:10:23Z")

</div>

what I am wanting to find out is what is the preferred why of  
manipulation a fx widget from another class?

My situation is this.

I have a fxruby class that displays and manages the GUI widgets.

One of these is a progress bar and the program passes control to another  
ruby class (has NO fxruby code in it) for the processing of data.

what i’d like is to have this secondary class update the progress bar  
that becomes visible before the calling of the other class.

I know I could achieve this by making a global variable ‘$’ but was  
wondering if someone could show me a better way.

cheers,

dave.
