digitalmars.D.learn - Problems with the DLangUI TreeWidget
- pezi_pink (33/33) Sep 08 2017 I am having some seemingly basic problems using the TreeWidget
- Vadim Lopatin (4/39) Sep 08 2017 It's known issue:
- pezi_pink (6/11) Sep 08 2017 Ah, thanks for the reply. I did check the issues on git,
- Vadim Lopatin (2/17) Sep 08 2017 Will try to fix it in a few days.
- Vadim Lopatin (4/19) Sep 11 2017 Fixed in v0.9.121
- pezi_pink (2/24) Sep 11 2017 Fantasic! Thank you very much :)
- Vadim Lopatin (4/10) Sep 12 2017 Feel free to submit issues on
I am having some seemingly basic problems using the TreeWidget
from DLangUI on Windows. I posted on the project's gitter
channel some time ago but did not get any response.
All I am trying to do is add children to the tree's nodes at
runtime. The simple code below attempts to add a new node when a
button is pressed. As far as I can tell, the node does indeed
get added, since the new node responds to keyboard events, but it
does not render. I have tried everything to get it to render,
using all the available invalidate/redraw methods, even as far as
removing and re-adding the control again to its layout, but
nothing seems to work. Any advice would be greatly received!
extern (C) int UIAppMain(string[] args) {
auto window = Platform.instance.createWindow("DlangUI example
- HelloWorld", null);
auto vlayout = new VerticalLayout();
TreeWidget tree = new TreeWidget("Root");
TreeItem tree2 = tree.items.newChild("machinesroot",
"Machines"d, null);
auto machine0 = tree2.newChild("machine0", "Machine 0"d, null);
machine0.newChild("machine0stack", "Stack", null);
auto btn = (new Button("btn1", "Button 1"d));
btn.click = delegate(Widget src) {
// this gets added but does not render
tree2.newChild("machine1", "Machine 1"d, null);
return true;
};
vlayout.addChild(btn);
vlayout.addChild(tree);
window.mainWidget = vlayout;
window.show();
return Platform.instance.enterMessageLoop();
}
Thanks
Sep 08 2017
On Friday, 8 September 2017 at 12:10:23 UTC, pezi_pink wrote:
I am having some seemingly basic problems using the TreeWidget
from DLangUI on Windows. I posted on the project's gitter
channel some time ago but did not get any response.
All I am trying to do is add children to the tree's nodes at
runtime. The simple code below attempts to add a new node when
a button is pressed. As far as I can tell, the node does
indeed get added, since the new node responds to keyboard
events, but it does not render. I have tried everything to get
it to render, using all the available invalidate/redraw
methods, even as far as removing and re-adding the control
again to its layout, but nothing seems to work. Any advice
would be greatly received!
extern (C) int UIAppMain(string[] args) {
auto window = Platform.instance.createWindow("DlangUI
example - HelloWorld", null);
auto vlayout = new VerticalLayout();
TreeWidget tree = new TreeWidget("Root");
TreeItem tree2 = tree.items.newChild("machinesroot",
"Machines"d, null);
auto machine0 = tree2.newChild("machine0", "Machine 0"d,
null);
machine0.newChild("machine0stack", "Stack", null);
auto btn = (new Button("btn1", "Button 1"d));
btn.click = delegate(Widget src) {
// this gets added but does not render
tree2.newChild("machine1", "Machine 1"d, null);
return true;
};
vlayout.addChild(btn);
vlayout.addChild(tree);
window.mainWidget = vlayout;
window.show();
return Platform.instance.enterMessageLoop();
}
Thanks
It's known issue:
https://github.com/buggins/dlangui/issues/278
Not sure if there is any workaround.
Sep 08 2017
On Friday, 8 September 2017 at 15:08:27 UTC, Vadim Lopatin wrote:On Friday, 8 September 2017 at 12:10:23 UTC, pezi_pink wrote:Ah, thanks for the reply. I did check the issues on git, obviously not well enough! That's a shame, it renders (no pun intended) DLangUI basically useless for my project :( maybe I will have to get the debugger out ...[...]It's known issue: https://github.com/buggins/dlangui/issues/278 Not sure if there is any workaround.
Sep 08 2017
On Friday, 8 September 2017 at 15:39:21 UTC, pezi_pink wrote:On Friday, 8 September 2017 at 15:08:27 UTC, Vadim Lopatin wrote:Will try to fix it in a few days.On Friday, 8 September 2017 at 12:10:23 UTC, pezi_pink wrote:Ah, thanks for the reply. I did check the issues on git, obviously not well enough! That's a shame, it renders (no pun intended) DLangUI basically useless for my project :( maybe I will have to get the debugger out ...[...]It's known issue: https://github.com/buggins/dlangui/issues/278 Not sure if there is any workaround.
Sep 08 2017
On Friday, 8 September 2017 at 15:39:21 UTC, pezi_pink wrote:On Friday, 8 September 2017 at 15:08:27 UTC, Vadim Lopatin wrote:Fixed in v0.9.121 See example1 / TreeWidget for sample of adding / removing of items.On Friday, 8 September 2017 at 12:10:23 UTC, pezi_pink wrote:Ah, thanks for the reply. I did check the issues on git, obviously not well enough! That's a shame, it renders (no pun intended) DLangUI basically useless for my project :( maybe I will have to get the debugger out ...[...]It's known issue: https://github.com/buggins/dlangui/issues/278 Not sure if there is any workaround.
Sep 11 2017
On Monday, 11 September 2017 at 09:00:36 UTC, Vadim Lopatin wrote:On Friday, 8 September 2017 at 15:39:21 UTC, pezi_pink wrote:Fantasic! Thank you very much :)On Friday, 8 September 2017 at 15:08:27 UTC, Vadim Lopatin wrote:Fixed in v0.9.121 See example1 / TreeWidget for sample of adding / removing of items.On Friday, 8 September 2017 at 12:10:23 UTC, pezi_pink wrote:Ah, thanks for the reply. I did check the issues on git, obviously not well enough! That's a shame, it renders (no pun intended) DLangUI basically useless for my project :( maybe I will have to get the debugger out ...[...]It's known issue: https://github.com/buggins/dlangui/issues/278 Not sure if there is any workaround.
Sep 11 2017
On Monday, 11 September 2017 at 17:57:14 UTC, pezi_pink wrote:On Monday, 11 September 2017 at 09:00:36 UTC, Vadim LopatinFeel free to submit issues on https://github.com/buggins/dlangui/issues if something is unclear or does not work as expected.Fixed in v0.9.121 See example1 / TreeWidget for sample of adding / removing of items.Fantasic! Thank you very much :)
Sep 12 2017









Vadim Lopatin <coolreader.org gmail.com> 