Skip to content

Commit

Permalink
added datatypes Demo/DatatypesDemo.bbj
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan Wald committed Feb 14, 2018
1 parent a5e5c7e commit 62de0c0
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions Demo/DatatypesDemo.bbj
@@ -0,0 +1,42 @@
use ::BBjGridExWidget/BBjGridExWidget.bbj::BBjGridExWidget
use com.basiscomponents.bc.SqlQueryBC
use java.sql.Types

? 'HIDE'

declare auto BBjTopLevelWindow wnd!
declare auto BBjListButton lb_db!
declare auto BBjListButton lb_tbl!
declare auto BBjToolButton btn_fit!
declare BBjGridExWidget grid!

wnd! = BBjAPI().openSysGui("X0").addWindow(10,10,800,600,"BBj Grid Ex Demo")

grid! = new BBjGridExWidget(wnd!,100,0,0,800,600)

wnd! .setCallback(BBjAPI.ON_CLOSE,"byebye")
wnd! .setCallback(BBjAPI.ON_RESIZE,"resize")

gosub fillGrid

process_events


fillGrid:

declare SqlQueryBC sbc!
sbc! = new SqlQueryBC(BBjAPI().getJDBCConnection("CDStore"))
rs! = sbc!.retrieve("SELECT * FROM CDINVENTORY")

grid!.setData(rs!)

return

byebye:
bye

resize:
ev! = BBjAPI().getLastEvent()
grid!.setSize(ev!.getWidth(),ev!.getHeight())
return

0 comments on commit 62de0c0

Please sign in to comment.