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

    bright-gpu-74537

    07/14/2019, 1:08 PM
    Copy code
    haxe
    var tabs = new TabView();
    tabs.width = 200;
    tabs.height = 100;
    
    var page1 = new VBox();
    page1.text = "Page 1";
    var button = new Button();
    button.text = "Button 1";
    page1.addComponent(button);
    var button = new Button();
    button.text = "Button 2";
    page1.addComponent(button);
    
    tab.addComponent(page1);
  • b

    bright-gpu-74537

    07/14/2019, 1:08 PM
    something like that?
  • l

    limited-advantage-32748

    07/14/2019, 1:08 PM
    Ah they need to be built before hand
  • l

    limited-advantage-32748

    07/14/2019, 1:08 PM
    Or built with the page component
  • l

    limited-advantage-32748

    07/14/2019, 1:08 PM
    I’ll try that when I get the chance
  • b

    bright-gpu-74537

    07/14/2019, 1:09 PM
    they shouldnt need to no... you can build the page (vbox in this case) and then add to that before using it as a page (tabview.addComponent) or add it, then populate it... shouldnt make a difference
  • l

    limited-advantage-32748

    07/14/2019, 1:10 PM
    I can’t seem to populate it is the issue
  • b

    bright-gpu-74537

    07/14/2019, 1:10 PM
    can you send a code sample? Might help to understand
  • l

    limited-advantage-32748

    07/14/2019, 1:10 PM
    It’s a lack of code I think
  • l

    limited-advantage-32748

    07/14/2019, 1:11 PM
    There doesn’t appear to be a way to specify a page on either tab components and populate them post
  • b

    bright-gpu-74537

    07/14/2019, 1:11 PM
    ok, so first thing to realise is that TabBar doesnt have pages... that is literally just a tabbar
  • b

    bright-gpu-74537

    07/14/2019, 1:11 PM
    tabview has the pages
  • b

    bright-gpu-74537

    07/14/2019, 1:12 PM
    ill knock up an example... 😃
  • l

    limited-advantage-32748

    07/14/2019, 1:12 PM
    Alright
  • b

    bright-gpu-74537

    07/14/2019, 1:16 PM
    Copy code
    haxe
                var tabs = new TabView();
                tabs.width = 200;
                tabs.height = 100;
                main.addComponent(tabs);
                
                var page = new VBox();
                page.text = "Page 1";
                var button = new Button();
                button.text = "Button 1";
                page.addComponent(button);
                var button = new Button();
                button.text = "Button 2";
                page.addComponent(button);
                tabs.addComponent(page);
    
                var page = new HBox();
                page.text = "Page 2";
                var button = new Button();
                button.text = "Button 1";
                page.addComponent(button);
                var button = new Button();
                button.text = "Button 2";
                page.addComponent(button);
                tabs.addComponent(page);
  • b

    bright-gpu-74537

    07/14/2019, 1:16 PM
    so, am i missing something? Are you doing something vastly different?
  • b

    bright-gpu-74537

    07/14/2019, 1:17 PM
    You can create the pages after and add them, or add them then populate them... order doesnt (shouldnt!) make any difference
  • b

    bright-gpu-74537

    07/14/2019, 1:17 PM
    if you are getting different / odd results, it would be good to see what code you are using to see if it is, indeed, some bug in haxeui
  • b

    bright-gpu-74537

    07/14/2019, 1:22 PM
    i see from your screenshot some code, so ill try that and see what happens
  • b

    bright-gpu-74537

    07/14/2019, 1:32 PM
    @limited-advantage-32748 - so i just tried this:
  • b

    bright-gpu-74537

    07/14/2019, 1:32 PM
    Copy code
    haxe
    class Main extends Sprite {
        public function new() {
            super();
            
            Toolkit.init();
            
            var btn = new Button();
            btn.text = "Im a button";
            addChild(btn);
            btn.x = 20;
            btn.y = 20;
        }
    }
  • b

    bright-gpu-74537

    07/14/2019, 1:32 PM
    works fine on new-component-method branch
  • b

    bright-gpu-74537

    07/14/2019, 1:32 PM
    and gets similar results to yours on master
  • b

    bright-gpu-74537

    07/14/2019, 1:32 PM
    😦
  • b

    bright-gpu-74537

    07/14/2019, 1:33 PM
    so, its another case of "can you switch to new component"
  • b

    bright-gpu-74537

    07/14/2019, 1:33 PM
    :/
  • l

    limited-advantage-32748

    07/14/2019, 1:33 PM
    Well there’s that issue
  • l

    limited-advantage-32748

    07/14/2019, 1:33 PM
    Which got fixed
  • l

    limited-advantage-32748

    07/14/2019, 1:33 PM
    The problem I was having is I cannot update pages through TabVies
  • l

    limited-advantage-32748

    07/14/2019, 1:33 PM
    I don’t know if I was clear on this but that’s what I have been getting at this entire time
1...818283...1687Latest