[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] EZRanger canFocus



hi Uri,
like this...
(
	w=Window.new.front;
g=EZRanger(w, 400@16," test ", \freq,{|v| v.value.postln}, [50,2000],unitWidth:30);
	Slider(w, Rect(10, 40, 100, 40));	//just here to compare always focus
)

(	//ezranger no focus
g.rangeSlider.canFocus= false;
g.hiBox.canFocus= false;
g.loBox.canFocus= false;
)


or to simplify your code you can write a class extension...

//save as extEZRanger.sc
+EZRanger {
	canFocus {|flag|
		[this.rangeSlider, this.hiBox, this.loBox].do{|x|
			x.canFocus= flag;
		}
	}
}


maybe the EZGui subclasses should have a method for collecting and returning an array of children views. or maybe there is and i couldn't find it.
_f


29 dec 2009 kl. 16.44 skrev Uri Sala:

Hi,
How does one set canFocus to false in an EZRanger?
Thanks
Uri


  #|
     fredrikolofsson.com     klippav.org     musicalfieldsforever.com
  |#


_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/