What can I embed within a WebListBox?

  1. 12 months ago

    Brian O

    19 Feb 2018 Pre-Release Testers, Xojo Pro Calgary, AB

    I put some text in a web list box with carriage return \ line feeds .
    The text came out formatted as i expected.

    I was wondering what else I could do to enhance the contents within a WebListBox?
    Can I embed pictures or html or javascript?

  2. Maurizio R

    19 Feb 2018 Pre-Release Testers, Xojo Pro

    CellPicture
    You can add a lot more if you dig into the structure of the weblistbox and how cells are defined.
    You need some knowledge of javascript to change cell contents but, basically, a lot can be done.

  3. Pietro B

    19 Feb 2018 Pre-Release Testers, Xojo Pro Europe (Swiss, Chiasso)
    Edited 12 months ago

    As you can see, you can also embed images in a weblistbox and in its header
    Image

    Take a look here

    This a sample project

  4. Brian O

    19 Feb 2018 Pre-Release Testers, Xojo Pro Calgary, AB
    Edited 12 months ago

    @Maurizio R CellPicture
    You can add a lot more if you dig into the structure of the weblistbox and how cells are defined.
    You need some knowledge of javascript to change cell contents but, basically, a lot can be done.

    I have no idea why but i appear not to have CellPicture in my WebListBox.

    Type "WebListBox" has no member named "CellPicture"
    ListBox1.AddRow(lvs, attr.GEtoString, sps+attr.getDescription, attr.getVR,  attr.getVM, attr.getDataSize.ToText, "Pixel Data", "")
       
        Dim p As Picture
        p = RenderImage(img)
        Dim wp As WebPicture = p
        
        ListBox1.CellPicture(0,0) = wp
  5. Maurizio R

    19 Feb 2018 Pre-Release Testers, Xojo Pro

    What Xojo version are you using?

  6. Brian O

    20 Feb 2018 Pre-Release Testers, Xojo Pro Calgary, AB

    2016 R2.1 Pro

  7. Maurizio R

    20 Feb 2018 Pre-Release Testers, Xojo Pro

    I don't remember exactly when CellPicture was added so you can find a solution here:
    Pictures in weblistbox cells

  8. Jared F

    20 Feb 2018 Pre-Release Testers, Xojo Pro Milwaukee, WI

    @Brian OBrien 2016 R2.1 Pro

    It looks like it was added in 2016r4

    http://developer.xojo.com/2016r4-release-notes

  9. Brian O

    20 Feb 2018 Pre-Release Testers, Xojo Pro Calgary, AB
    Edited 12 months ago

    -image-

  10. Tim H

    20 Feb 2018 Pre-Release Testers Portland, OR USA

    I told you not to tell me, 99.

  11. Tony L

    21 Feb 2018 Pre-Release Testers, Xojo Pro Hong Kong

    Awesome font also.

  12. Brian O

    21 Feb 2018 Pre-Release Testers, Xojo Pro Calgary, AB

    So am I out of luck? Do I have to buy a new Pro License?

  13. @Brian OBrien So am I out of luck? Do I have to buy a new Pro License?

    Test this

    ListBox1.AddRow "<raw><b>Test</b></raw>"

    If you can see bold "Test" then you don't need to buy a new license.

  14. Maurizio R

    21 Feb 2018 Pre-Release Testers, Xojo Pro
    Edited 12 months ago

    You don't need to buy a new license, you can embed stuff using javascript just like Xojo does.

    As stated by Xojo staff, if you need something not available in the web framework you can doit using javascript and WebSDK.
    As an example one thing that you can't use at its full potential is CSS i.e. styles: this is something that also the latest Xojo version simply lack.

    The problem is if you want to invest in knowledge or pay someone else for plugins.
    It's not so difficult to master javascript for some things like adding an image to a cell as already reported in the above forum link.
    Knowledge in HTML, CSS and javascript is something that can be reused a lot if you need to develop web apps.

  15. Brian O

    21 Feb 2018 Pre-Release Testers, Xojo Pro Calgary, AB

    @AsisPatisahusiwa Test this

    ListBox1.AddRow "<raw><b>Test</b></raw>"

    If you can see bold "Test" then you don't need to buy a new license.

    No I see the text exactly as is. :(

  16. Brian O

    21 Feb 2018 Pre-Release Testers, Xojo Pro Calgary, AB

    Thanks all.

  17. 5 weeks ago

    Hal G

    Jan 16 Pre-Release Testers, Xojo Pro, XDC Speakers Orlando, FL

    Can WebListBox's embed WebControls?

  18. Brock N

    Jan 16 Pre-Release Testers, Xojo Pro

    The Raw tag helps with basic things, you can hook up the events you embed with a custom WebControlWrapper control if you need. I've also used JQuery to embed container controls inside of listboxes in the past as well.

  19. Hal G

    Jan 17 Pre-Release Testers, Xojo Pro, XDC Speakers Orlando, FL

    Just requested:

    54683 - Add WebListBox.CellContainer Method for easy Lists of WebContainers
    Feedback Case #54683

    WebListBox has the ability to place Text, HTML, and Pictures into WebListBox Cells.

    While Scrolling WebContainers make it possible to create a list of WebContainers, it adds complexity in order to manage positioning WebContainers when adding or removing WebContainers. Adding a WebContainer to a Scrolling WebContainer requires finding the top of the lowest item, adding its height, and adding a margin. Removing a WebContainer from a Scrolling WebContainer requires removing the WebContainer, then finding each WebContainer lower than the WebContainer and moving it up based on the height of the removed WebContainer plus the margin.

    If WebListBox could hold WebContainers, it would make managing as list of WebContainers a pleasure.

    Workarounds:
    Scrolling WebContainers with Embedded WebContainers

  20. Hal G

    Jan 17 Pre-Release Testers, Xojo Pro, XDC Speakers Orlando, FL

    @Brock N The Raw tag helps with basic things, you can hook up the events you embed with a custom WebControlWrapper control if you need. I've also used JQuery to embed container controls inside of listboxes in the past as well.

    Hey Brock,

    I'm going to test this soon, but I was wondering if the following idea might work based on your amazing experience...

    • Create a WebListbox
    • Add a Listbox Row with something like this in the Cell
    <raw><div id='myListboxRowUUID'></div></raw>
    • Instantiate a WebContainer in the Listbox RowTag
    • Embed the WebContainer somewhere on the page
    • Move the WebContainer from the page to the WebListbox Cell with something like this
    jQuery("#webContainerUUID").detach().appendTo('#myListboxRowUUID')

    Do you think that would work?

  21. Newer ›

or Sign Up to reply!