https://linen.dev logo
Join Discord
Powered by
# haxe-ui
  • b

    bright-gpu-74537

    07/14/2019, 1:34 PM
    ok, so, can you share a bit of code so i can understand what you mean by any chance? Also, just to confirm, you are on
    new-component-method
    branches, right?
  • l

    limited-advantage-32748

    07/14/2019, 1:35 PM
    I am on those branches
  • b

    bright-gpu-74537

    07/14/2019, 1:35 PM
    great...
  • b

    bright-gpu-74537

    07/14/2019, 1:35 PM
    any chance of a little test code as i think im not following properly
  • l

    limited-advantage-32748

    07/14/2019, 1:35 PM
    And I cannot share any code as the issue I am perceiving is a lack of code
  • l

    limited-advantage-32748

    07/14/2019, 1:36 PM
    There appears to be no ``tabs.addComponentToPage(pagenum, component);``
  • b

    bright-gpu-74537

    07/14/2019, 1:37 PM
    the "page" is the component you add to the tabview
  • l

    limited-advantage-32748

    07/14/2019, 1:37 PM
    Yes I see that now
  • b

    bright-gpu-74537

    07/14/2019, 1:37 PM
    so if you add a vbox to the tabview, then thats the page... then you can just add to that vbox
  • b

    bright-gpu-74537

    07/14/2019, 1:39 PM
    you can also do:
  • b

    bright-gpu-74537

    07/14/2019, 1:39 PM
    Copy code
    haxe
                var button = new Button();
                button.text = "Bob";
                tabs.getComponentAt(1).addComponent(button);
  • b

    bright-gpu-74537

    07/14/2019, 1:39 PM
    (that adds a bob button to the second page)
  • b

    bright-gpu-74537

    07/14/2019, 1:41 PM
    or you could do:
  • b

    bright-gpu-74537

    07/14/2019, 1:41 PM
    Copy code
    haxe
    tabs.findComponent("myContainer", HBox).addComponent(button);
  • b

    bright-gpu-74537

    07/14/2019, 1:42 PM
    that will recursively look for a "myContainer" id HBox and add a component to that
  • b

    bright-gpu-74537

    07/14/2019, 1:42 PM
    and example of what the xml might look like there would be:
  • b

    bright-gpu-74537

    07/14/2019, 1:43 PM
    Copy code
    xml
    <tabview width="200" height="100">
        <vbox text="Page 1">
            <button text="Button 1" />
            <button text="Button 2" />
            <button text="Button 3" />
        </vbox>
        <hbox text="Page 2">
            <button text="Button 1" />
            <button text="Button 2" />
            <button text="Button 3" />
            <vbox>
                <hbox id="myContainer">
                </hbox>
            </vbox>
        </hbox>
    </tabview>
  • b

    bright-gpu-74537

    07/14/2019, 1:43 PM
    (ofc, you dont have to use xml, its just easier to show you what the component hierarchy would look like, you could also happily build all that in code - its all the xml macros do)
  • b

    bright-gpu-74537

    07/14/2019, 1:46 PM
    i guess it couldnt hurt to add a "getPage(index)" either.... i mean, it would just return (getComponentAt) but i wonder if that clears up some of the confusion?
  • b

    bright-gpu-74537

    07/14/2019, 3:30 PM
    any of that help at all @limited-advantage-32748 ? 😃
  • l

    limited-advantage-32748

    07/14/2019, 3:30 PM
    Yeah definitely
  • l

    limited-advantage-32748

    07/14/2019, 3:31 PM
    My issue was I was unware of how i was supposed to approach the component
  • b

    bright-gpu-74537

    07/14/2019, 3:31 PM
    ok, great... good to hear!
  • b

    bright-gpu-74537

    07/14/2019, 3:32 PM
    ping me if you have anymore issues... as a by-the-by... do you think "getPage(index)" is worth adding?
  • b

    bright-gpu-74537

    07/14/2019, 3:32 PM
    (to tabview)
  • l

    limited-advantage-32748

    07/14/2019, 4:16 PM
    I do believe it would help
  • l

    limited-advantage-32748

    07/14/2019, 4:16 PM
    There might be situations where the dev might not be able to grab the exact var name needed of a tab view
  • q

    quick-king-64105

    07/15/2019, 9:28 AM
    Has it been at least a week? I don't track time well and I spent the last week doing Ubuntu packaging.
  • q

    quick-king-64105

    07/15/2019, 9:29 AM
    Usually try to pop my head in where there's things I'm waiting on and ask where that's at, if only to say "hey, still here, still interested"
  • q

    quick-king-64105

    07/15/2019, 9:29 AM
    Hey, still here, still interested in getting the flixel backend going 😉
1...828384...1687Latest