Re: [flexcoders] DataGrid column header - wordWrap - but not break whole words

2007-05-02 Thread slangeberg

I did fumble around a bit with the header renderer, and that is probably the
ultimate way to go. However, I was able to come up with a pretty low-tech
solution, for the time being:

http://blog.criticalpile.com/?p=13

-Scott

On 4/27/07, Manish Jethani [EMAIL PROTECTED] wrote:


  On 4/28/07, slangeberg [EMAIL PROTECTED] slangeberg%40gmail.com
wrote:
 Any one come up with a strategy so that labels in the DataGrid column
 headers (or elsewhere) can wrap, but not be broken in the midde of a
word?

That's the behaviour of the built-in TextField object and I don't
think anything can be done about it. You could maybe write your own
header renderer and write the word-wrapping logic yourself (and
truncate words that are longer than the available width).
 





--

: : ) Scott


Re: [flexcoders] DataGrid column header - wordWrap - but not break whole words

2007-04-30 Thread slangeberg

Is there any reason why you can't set the headerRenderer in AS3? I'm getting
the following error (and this is just pointing at the 'default' class - I
want to extend it):

var col:DataGridColumn = new DataGridColumn();
col.headerRenderer = IFactory(DataGridItemRenderer);

---

TypeError: Error #1034: Type Coercion failed: cannot convert
dii.controls.dataGridClasses::HeaderRenderer$ to mx.core.IFactory.
   at com.dii.modelPro.view::GridFactory$/getColumns()
   at com.dii.modelPro.view::GridFactory$/getGrid()
   at com.dii.modelPro.view.projectDetails::DetailItem/::render()
   at MethodInfo-4641()
   at Function/http://adobe.com/AS3/2006/builtin::apply()
   at mx.core::UIComponent/::callLaterDispatcher2()
   at mx.core::UIComponent/::callLaterDispatcher()

-Scott

On 4/27/07, Manish Jethani [EMAIL PROTECTED] wrote:


  On 4/28/07, slangeberg [EMAIL PROTECTED] slangeberg%40gmail.com
wrote:
 Any one come up with a strategy so that labels in the DataGrid column
 headers (or elsewhere) can wrap, but not be broken in the midde of a
word?

That's the behaviour of the built-in TextField object and I don't
think anything can be done about it. You could maybe write your own
header renderer and write the word-wrapping logic yourself (and
truncate words that are longer than the available width).
 





--

: : ) Scott


Re: [flexcoders] DataGrid column header - wordWrap - but not break whole words

2007-04-30 Thread slangeberg

Ok, disregard. Fix should be:

col.headerRenderer = new ClassFactory( HeaderRenderer );

As found here:

http://www.returnundefined.com/tags/as3/

-Scott

On 4/30/07, slangeberg [EMAIL PROTECTED] wrote:


Is there any reason why you can't set the headerRenderer in AS3? I'm
getting the following error (and this is just pointing at the 'default'
class - I want to extend it):

var col:DataGridColumn = new DataGridColumn();
col.headerRenderer = IFactory(DataGridItemRenderer);

---

TypeError: Error #1034: Type Coercion failed: cannot convert
dii.controls.dataGridClasses::HeaderRenderer$ to mx.core.IFactory .
at com.dii.modelPro.view::GridFactory$/getColumns()
at com.dii.modelPro.view::GridFactory$/getGrid()
at com.dii.modelPro.view.projectDetails::DetailItem/::render()
at MethodInfo-4641()
at Function/http://adobe.com/AS3/2006/builtin::apply()
at mx.core::UIComponent/::callLaterDispatcher2()
at mx.core::UIComponent/::callLaterDispatcher()

-Scott

On 4/27/07, Manish Jethani [EMAIL PROTECTED] wrote:

   On 4/28/07, slangeberg [EMAIL PROTECTED] slangeberg%40gmail.com
 wrote:
  Any one come up with a strategy so that labels in the DataGrid column
  headers (or elsewhere) can wrap, but not be broken in the midde of a
 word?

 That's the behaviour of the built-in TextField object and I don't
 think anything can be done about it. You could maybe write your own
 header renderer and write the word-wrapping logic yourself (and
 truncate words that are longer than the available width).
  





--

: : ) Scott





--

: : ) Scott


[flexcoders] DataGrid column header - wordWrap - but not break whole words

2007-04-27 Thread slangeberg

Any one come up with a strategy so that labels in the DataGrid column
headers (or elsewhere) can wrap, but not be broken in the midde of a word?

EX:

Actual
Response

NOT:

Actual
Respons
e


Thanks,

: : ) Scott


Re: [flexcoders] DataGrid column header - wordWrap - but not break whole words

2007-04-27 Thread Manish Jethani
On 4/28/07, slangeberg [EMAIL PROTECTED] wrote:
  Any one come up with a strategy so that labels in the DataGrid column
 headers (or elsewhere) can wrap, but not be broken in the midde of a word?

That's the behaviour of the built-in TextField object and I don't
think anything can be done about it. You could maybe write your own
header renderer and write the word-wrapping logic yourself (and
truncate words that are longer than the available width).