Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Label does not display #242

Open
bru65pag opened this issue Feb 16, 2020 · 0 comments
Open

Label does not display #242

bru65pag opened this issue Feb 16, 2020 · 0 comments
Labels
question Question about how to use azul

Comments

@bru65pag
Copy link

bru65pag commented Feb 16, 2020

Good evening,

I'm trying to build a "Hello World" program with azul. I came up with the following code (re-using some code i found on the wiki):

extern crate azul;

use azul::{prelude::*, widgets::{label::Label}};

struct HelloWorld { }

impl Layout for HelloWorld {
    fn layout(&self, _: LayoutInfo<Self>) -> Dom<Self> {
        let label = Label::new("Hello World").dom();

        Dom::div()
         .with_child(label)
    }
}

fn main() {
    let mut app = App::new(HelloWorld { }, AppConfig::default()).unwrap();
    let window = app.create_window(WindowCreateOptions::default(), css::native()).unwrap();
    app.run(window).unwrap();
}

It compiles well. However, when I run it, I get an empty window; my label is not displayed :-(

I must be missing something obvious... You're help is welcome.

@bru65pag bru65pag added the question Question about how to use azul label Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question about how to use azul
Projects
None yet
Development

No branches or pull requests

1 participant