This repository has been archived by the owner on Feb 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CountryTouch.bbj
64 lines (46 loc) · 1.93 KB
/
CountryTouch.bbj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
if INFO(3,6)<>"5" then
::components/util/Util.bbj::Util.runAsBui(pgm(-1))
fi
use ::components/ui/unbound/WindowStack.bbj::WindowStack
use ::ui/CountryTouchScreenCombo.bbj::CountryTouchScreenCombo
use ::bl/CountryBusinessComponent.bbj::CountryBusinessComponent
rem * this sample shows a touch version of a search grid + form
rem * embedded in a child window
rem * note that WindowStack by default can be used
rem * to achieve a full screen display of the screen
listpagesize$ = stbl("!LIST_PAGE_SIZE","10")
BBjAPI().getConfig().setOptionSetting("FAST_TOUCH_CLICK", 1)
sg! = BBjAPI().openSysGui("X0")
screenSize! = BBjAPI().getSysGui().getSystemMetrics().getScreenSize()
wnd! = sg!.addWindow(0,0,screenSize!.width,screenSize!.height,"",$01081010$ )
wnd!.setCallback(BBjAPI.ON_SCREEN_RESIZE,"resize")
wnd!.setCallback(wnd!.ON_CLOSE,"byebye")
frame! = wnd!.addChildWindow(100,0,40,screenSize!.width,screenSize!.height-80,"",$00000800$,BBjAPI().getSysGui().getAvailableContext())
WindowStack.setContainerWnd(frame!)
bc! = new CountryBusinessComponent()
cw! = WindowStack.openWindow(bc!.getTitle())
ctc! = new CountryTouchScreenCombo(cw!, bc!)
WindowStack.setWidget(ctc!)
myTopBar! = wnd!.addStaticText(110, 0, 0, w, 40, "")
myTopBar!.setName("topGradientBar")
wnd!.addImage(111,0,0,2500,40,"components/css/banner.png")
myStatusBar! = wnd!.addStaticText(112, 0, h-20, w, 20, "")
myStatusBar!.setName("topGradientBar")
myExit! = wnd!.addButton(200, screenSize!.width-24-8, 8, 30, 30, "")
myExit!.setName("exitButton")
myExit!.setCallback(BBjAPI.ON_BUTTON_PUSH, "byebye")
wnd!.setVisible(1)
process_events
byebye:
bye
resize:
ev! = BBjAPI().getLastEvent()
w = ev!.getWidth()
h = ev!.getHeight()
myTopBar!.setSize(w,40)
myStatusBar!.setSize(w,20)
myStatusBar!.setLocation(0, h-20)
myExit!.setLocation(w-24-8,8)
frame!.setSize(w,h-80)
WindowStack.resize(w,h-80)
return