GTKD - Attach Button to Grid in specific column and row
TheDGuy via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Jun 11 07:57:00 PDT 2016
Hi,
i am wondering why this code doesn't work, even though i set the
column and row position of the button it is always placed at the
top left (so basically first row and first column):
this(int width, int height, string title){
super(title);
setDefaultSize(width,height);
Button btn = new Button();
btn.setSizeRequest(25,25);
btn.setLabel("Exit");
auto call = &enterEvent;
btn.addOnEnterNotify(call);
btn.addOnLeaveNotify(call);
Grid grid = new Grid();
grid.setColumnSpacing(6);
grid.setRowSpacing(6);
grid.attach(btn,3,3,1,1);
add(grid);
showAll();
}
More information about the Digitalmars-d-learn
mailing list