RE: Combo Box

"4jsmaillist \(reuben\)" <[email protected]> Tue, 13 Jun 2006 09:20:36 +1200
Newsgroups gmane.comp.lang.4gl.fourjs.user
Message-ID <[email protected]>
If you still have problems start the GDC in Debug mode (with the -D option),
and Control Right-Click on your combobox field.  If you've clicked over the
combobox field correctly this will display the debug info for the current
combobox field.  Examine the FormField node in particular the value
attribute, and the name attributes of the item nodes that are children of
the combobox node which is turn a child node of the FormField node.  In
particular look at the value in the Attribute Value with spaces column.
What you'll most likely find is that the Form Field value is "ABC" whilst
the item value is "ABC   " or vice versa so you'll need a CLIPPED somewhere.
As Jean suggested in the addItem function, or maybe in a DISPLAY.  If you
see "***" then you need to make the item in your form wider.

Also have a look in the $FGLDIR/demo/Widgets folder (this will also help for
your label question)

HTH

Reuben


  -----Original Message-----
  From: [email protected] [mailto:[email protected]]On
Behalf Of Jean Gidcumb
  Sent: Tuesday, 13 June 2006 8:57 a.m.
  To: [email protected]
  Subject: RE: [fourjs-users] Combo Box


  Try clipping the p_code.




----------------------------------------------------------------------------
--

  From: [email protected] [mailto:[email protected]] On
Behalf Of Shaun Watts
  Sent: Monday, June 12, 2006 4:06 PM
  To: [email protected]
  Subject: RE: [fourjs-users] Combo Box



  I tried to clip the end of my variable, but it still does not display.

  Here is my code that I am trying to implement.



  function fill_combo(cb)
    define cb ui.ComboBox
    define p_query STRING
    define p_code  VARCHAR(10)
    define l_name VARCHAR(20)
    define f_name VARCHAR(20)
    define full_name VARCHAR(30)
    define i INT



     let p_query = "Select ofr_id,ofr_last,ofr_first from officers " CLIPPED



    if cb.getTag()="cr_officer_id_no" then
        PREPARE q_comboList FROM p_query
        DECLARE c_comboList CURSOR FOR q_comboList



        ### Get list of values ###
        FOREACH c_comboList INTO p_code,l_name,f_name
           let full_name = f_name clipped," ",l_name clipped
           CALL cb.addItem(p_code,full_name clipped)
           let i = i + 1
        END FOREACH
    end if



  end function




----------------------------------------------------------------------------
--

  From: [email protected] [mailto:[email protected]] On
Behalf Of Jean Gidcumb
  Sent: Monday, June 12, 2006 9:01 AM
  To: [email protected]
  Subject: RE: [fourjs-users] Combo Box

  Hi Shaun,



  Yes. I have experienced this myself. What I found out is that if the data
being display has trailing spaces, then the value will not stay displayed.



  I hope that helps.



  Jean Gidcumb

  Programmer/Analyst

  Almost Family, Inc

  502-891-1459




----------------------------------------------------------------------------
--

  From: [email protected] [mailto:[email protected]] On
Behalf Of Shaun Watts
  Sent: Monday, June 12, 2006 8:41 AM
  To: [email protected]
  Subject: [fourjs-users] Combo Box



  I am trying to use the combo box in Genero, but when I select my option in
my combo box it does not stay displayed.  Has anyone else had this issue?
How can I fix it?



  Thanks,

  Shaun Watts



  Programmer/Analyst

  CSI - Computer Systems, Inc.         Phone:  317.913.4160
  12975 Parkside Drive                          Fax:  317.913.4175
  Fishers, IN  46038                       Toll Free:  800.860.1274



  "To conquer fear is the beginning of wisdom."
  - Bertrand Russell