From 2a4aa8e921ee0b31d1486374bf2cfd3569cd80c0 Mon Sep 17 00:00:00 2001 From: Stephan Wald Date: Mon, 30 Apr 2018 13:49:16 +0200 Subject: [PATCH] fix #37 --- BBjGridExWidget.bbj | 2 +- Demo/CD-Store.bbj | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/BBjGridExWidget.bbj b/BBjGridExWidget.bbj index 36087829..4cc7b7be 100644 --- a/BBjGridExWidget.bbj +++ b/BBjGridExWidget.bbj @@ -360,7 +360,7 @@ class public BBjGridExWidget extends BBjWidget rem * @param BBjInt w: width rem * @param BBjInt h: height rem */ - method public BBjGridExWidget(BBjWindow wnd!, BBjInt id!, BBjInt x!, BBjInt y!, BBjInt w!, BBjInt h!) + method public BBjGridExWidget(BBjWindow wnd!, BBjNumber id!, BBjNumber x!, BBjNumber y!, BBjNumber w!, BBjNumber h!) #super!.create(wnd!,id!,x!,y!,w!,h!) methodend rem /** diff --git a/Demo/CD-Store.bbj b/Demo/CD-Store.bbj index a6a161af..60dbb840 100644 --- a/Demo/CD-Store.bbj +++ b/Demo/CD-Store.bbj @@ -10,8 +10,13 @@ declare auto BBjListButton lb_tbl! declare auto BBjToolButton btn_fit! declare BBjGridExWidget grid! +x=0 +y=0 +w=800 +h=600 + wnd! = BBjAPI().openSysGui("X0").addWindow(10,10,800,600,"BBj Grid Ex Demo") -grid! = new BBjGridExWidget(wnd!,100,0,0,800,600) +grid! = new BBjGridExWidget(wnd!,100,x,y,w,h) wnd! .setCallback(BBjAPI.ON_CLOSE,"byebye") wnd! .setCallback(BBjAPI.ON_RESIZE,"resize") @@ -33,5 +38,7 @@ bye resize: ev! = BBjAPI().getLastEvent() -grid!.setSize(ev!.getWidth(),ev!.getHeight()) +w=ev!.getWidth() +h=ev!.getHeight() +grid!.setSize(w,h) return \ No newline at end of file