Open sinanakyazici opened 3 years ago
Hi, I have 5 boxes in layout. I cannot set their position. I want to put a box location where i want.
` var blessed = require("blessed"); var screen = blessed.screen({ smartCSR: true, });
var layout = blessed.layout({ parent: screen, top: "center", left: "center", width: "100%", height: "100%", border: "line", style: { bg: "red", border: { fg: "blue", }, }, });
blessed.box({ parent: layout, width: 20, content: "Hello World 1", align: "center", height: 3, border: "line", top: 10, left: 10, });
blessed.box({ parent: layout, width: 20, content: "Hello World 2", align: "center", height: 3, border: "line", top: 10, right: 10, });
blessed.box({ parent: layout, width: 20, content: "Hello World 3", align: "center", height: 3, border: "line", bottom: 10, left: 10, });
blessed.box({ parent: layout, width: 20, content: "Hello World 4", align: "center", height: 3, border: "line", bottom: 10, right: 10, });
blessed.box({ parent: layout, width: 20, content: "Hello World 5", align: "center", height: 3, border: "line", top: 'center', left: 'center', }); screen.render(); `
Hi, I have 5 boxes in layout. I cannot set their position. I want to put a box location where i want.
` var blessed = require("blessed"); var screen = blessed.screen({ smartCSR: true, });
var layout = blessed.layout({ parent: screen, top: "center", left: "center", width: "100%", height: "100%", border: "line", style: { bg: "red", border: { fg: "blue", }, }, });
blessed.box({ parent: layout, width: 20, content: "Hello World 1", align: "center", height: 3, border: "line", top: 10, left: 10, });
blessed.box({ parent: layout, width: 20, content: "Hello World 2", align: "center", height: 3, border: "line", top: 10, right: 10, });
blessed.box({ parent: layout, width: 20, content: "Hello World 3", align: "center", height: 3, border: "line", bottom: 10, left: 10, });
blessed.box({ parent: layout, width: 20, content: "Hello World 4", align: "center", height: 3, border: "line", bottom: 10, right: 10, });
blessed.box({ parent: layout, width: 20, content: "Hello World 5", align: "center", height: 3, border: "line", top: 'center', left: 'center', }); screen.render(); `