Re: [flexcoders] Re: About Combobox filling up the first item by default when we databinding

2007-11-14 Thread Tom Chiverton
On Wednesday 14 Nov 2007, srikanth_reddy_007 wrote:
 mx:ComboBox id=txtFamilyName
  y=24 
 left=10 right=10 editable=true
  
 focusIn=fetchAutoCompleteData(event, 'Family')
  
 dataProvider={modelLocator.searchModel.family}
  
 focusOut=foucusOutHandler()/

mx:ComboBox id=txtFamilyName 
   
y=24 left=10 right=10 
editable=true 
  
focusIn=fetchAutoCompleteData(event, 
'Family')   
dataProvider={modelLocator.searchModel.family}
   
focusOut=foucusOutHandler()
prompt=pick something...
labelFunction=truncateADataItem
/

-- 
Tom Chiverton
Helping to globally disintermediate six-generation e-tailers
on: http://thefalken.livejournal.com



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at St 
James's Court Brown Street Manchester M2 2JF.  A list of members is available 
for inspection at the registered office.  Any reference to a partner in 
relation to Halliwells LLP means a member of Halliwells LLP.  Regulated by The 
Solicitors Regulation Authority.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 2500.

For more information about Halliwells LLP visit www.halliwells.com.


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 


[flexcoders] Re: About Combobox filling up the first item by default when we databinding

2007-11-14 Thread srikanth_reddy_007
I don't get what you mean to say ...

I have the code like this

mx:ComboBox id=txtFamilyName 
   y=24 
left=10 right=10 editable=true
   
focusIn=fetchAutoCompleteData(event, 'Family')
   
dataProvider={modelLocator.searchModel.family}
   
focusOut=foucusOutHandler()/

in fetchAutoCompleteData function i will connect to database and
update modelLocator.searchModel.family variable which has a
databinding to ComboBox dataprovider. then the combobox will get
populated with the first item of modelLocator.searchModel.family array
. How can i avoid this?

and secondly the combobox grows its size to the max item fetched in
the array. how can i avoid that too.

Thanks,
Srikanth


--- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED]
wrote:

 On Wednesday 14 Nov 2007, srikanth_reddy_007 wrote:
  field. I don't want the first item to be populated by default? Does
  anybody help me in achieve this ? 
 
 If only some sort of 'prompt' paramater was listed on the LiveDocs, eh ?
 
  body suggest me a way to bring truncated string with ... rather than
  dynamically growing the combo box.
 
 You want a labelFunction there, I reckon.
 
 -- 
 Tom Chiverton
 Helping to authoritatively bully interdependent channels
 on: http://thefalken.livejournal.com
 
 
 
 This email is sent for and on behalf of Halliwells LLP.
 
 Halliwells LLP is a limited liability partnership registered in
England and Wales under registered number OC307980 whose registered
office address is at St James's Court Brown Street Manchester M2 2JF.
 A list of members is available for inspection at the registered
office.  Any reference to a partner in relation to Halliwells LLP
means a member of Halliwells LLP.  Regulated by The Solicitors
Regulation Authority.
 
 CONFIDENTIALITY
 
 This email is intended only for the use of the addressee named above
and may be confidential or legally privileged.  If you are not the
addressee you must not read it and must not use any information
contained in nor copy it nor inform any person other than Halliwells
LLP or the addressee of its existence or contents.  If you have
received this email in error please delete it and notify Halliwells
LLP IT Department on 0870 365 2500.
 
 For more information about Halliwells LLP visit www.halliwells.com.





[flexcoders] Re: About Combobox filling up the first item by default when we databinding

2007-11-14 Thread Randy Martin

From the Flex docs for ComboBox:

prompt property
   prompt:String
http://127.0.0.1:2522/help/topic/com.adobe.flexbuilder.help/langref/Str\
ing.html   [read-write]


The prompt for the ComboBox control. A prompt is a String that is
displayed in the TextInput portion of the ComboBox when selectedIndex =
-1. It is usually a String like Select one If there is no prompt,
the ComboBox control sets seletedIndex to 0 and displays the first item
in the dataProvider.

So, all you have to do is set prompt =   in the tag and set
selectedIndex = -1 in your focusIn function after you set the
dataProvider. I do this all the time. Works like a charm. You can also
set the prompt to something more meaningful, like Select a Family
Name...

mx:ComboBox
   id=txtFamilyName
   y=24 left=10 right=10
   editable=true
   focusIn=fetchAutoCompleteData(event,'Family')
   dataProvider={modelLocator.searchModel.family}
   focusOut=focusOutHandler()
   prompt=  /

HTH,
Randy

--- In flexcoders@yahoogroups.com, srikanth_reddy_007
[EMAIL PROTECTED] wrote:

 I don't get what you mean to say ...

 I have the code like this

 mx:ComboBox id=txtFamilyName
 y=24 left=10 right=10 editable=true
 focusIn=fetchAutoCompleteData(event, 'Family')
 dataProvider={modelLocator.searchModel.family}
 focusOut=foucusOutHandler()/

 in fetchAutoCompleteData function i will connect to database and
 update modelLocator.searchModel.family variable which has a
 databinding to ComboBox dataprovider. then the combobox will get
 populated with the first item of modelLocator.searchModel.family array
 . How can i avoid this?

 and secondly the combobox grows its size to the max item fetched in
 the array. how can i avoid that too.

 Thanks,
 Srikanth


 --- In flexcoders@yahoogroups.com, Tom Chiverton tom.chiverton@
 wrote:
 
  On Wednesday 14 Nov 2007, srikanth_reddy_007 wrote:
   field. I don't want the first item to be populated by default?
Does
   anybody help me in achieve this ?
 
  If only some sort of 'prompt' paramater was listed on the LiveDocs,
eh ?
 
   body suggest me a way to bring truncated string with ... rather
than
   dynamically growing the combo box.
 
  You want a labelFunction there, I reckon.
 
  --
  Tom Chiverton
  Helping to authoritatively bully interdependent channels
  on: http://thefalken.livejournal.com
 
  
 
  This email is sent for and on behalf of Halliwells LLP.
 
  Halliwells LLP is a limited liability partnership registered in
 England and Wales under registered number OC307980 whose registered
 office address is at St James's Court Brown Street Manchester M2 2JF.
 A list of members is available for inspection at the registered
 office. Any reference to a partner in relation to Halliwells LLP
 means a member of Halliwells LLP. Regulated by The Solicitors
 Regulation Authority.
 
  CONFIDENTIALITY
 
  This email is intended only for the use of the addressee named above
 and may be confidential or legally privileged. If you are not the
 addressee you must not read it and must not use any information
 contained in nor copy it nor inform any person other than Halliwells
 LLP or the addressee of its existence or contents. If you have
 received this email in error please delete it and notify Halliwells
 LLP IT Department on 0870 365 2500.
 
  For more information about Halliwells LLP visit www.halliwells.com.