B4J Question combobox , how to set visible raws count programatically

Discussion in 'B4J Questions' started by le_toubib, Apr 4, 2015.

  1. le_toubib

    le_toubib Active Member Licensed User

    Hi falks
    How to show more Raws in a combobox dynamically?
    thx
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You can add items to the Items property:
    Code:
    cmb.Items.Add("New Item")
     
  3. le_toubib

    le_toubib Active Member Licensed User

    I was asking about how to "Show" more from the already added raws :) I.e : setmaxvisibleraw
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Code:
    Dim jo As JavaObject = ComboBox1
    jo.RunMethod(
    "setVisibleRowCount"Array(20))
     
  5. Daestrum

    Daestrum Well-Known Member Licensed User

    You can get strange results from this as it seems to depend on the order you do things.

    combo created in designer in both cases

    1,
    load layout
    show form
    add items
    try to resize - size is wrong (seems to be just over 1 line high)
    no resize - combo shows correct number of rows from designer.

    2,
    load layout
    add items
    show form
    resize works as expected.

    Maybe someone could confirm this
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Maybe you should remove and add the items after you change this property.
     
  7. rwblinn

    rwblinn Well-Known Member Licensed User

    Hi,

    have tested (using latest version = JavaFX 8u40) "load layout, show form, add items, change visible rowcount" without issues.

    See attached example.
     

    Attached Files:

    Erel likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice