rem /** rem * DWC1.bbj rem * This program is the result of starting with the GUISample.bbj program and rem * making several DWC-specific changes to it, including: rem * - Setting the window's flag to opt-in to flow layout rem * - Executing setPanelStyle() methods to use CSS Grid for the window's layout rem * - Executing setStyle() on the [Say Hello] button to place in it the grid's second column rem * - Executing setAttribute() on the [Say Hello] button to affect its size and theme rem */ wnd! = BBjAPI().openSysGui("X0").addWindow(10,10,450,140,"Hello BBj DWC", $00100083$) wnd!.setPanelStyle("display","grid") wnd!.setPanelStyle("grid-template-columns","180px auto") wnd!.setPanelStyle("gap","5px") wnd!.setPanelStyle("padding","15px") st! = wnd!.addStaticText(wnd!.getAvailableControlID(),10,10,200,20,"First Name:") ed_firstname! = wnd!.addEditBox(wnd!.getAvailableControlID(),210,10,200,20,"") st! = wnd!.addStaticText(wnd!.getAvailableControlID(),10,40,200,20,"Last Name:") ed_lastname! = wnd!.addEditBox(wnd!.getAvailableControlID(),210,40,200,20,"") btn! = wnd!.addButton(wnd!.getAvailableControlID(),10,70,400,30,"Say Hello") btn!.setStyle("grid-column","2") btn!.setAttribute("expanse","xl") btn!.setAttribute("theme","success") wnd!.setCallback(BBjAPI.ON_CLOSE,"byebye") btn!.setCallback(BBjAPI.ON_BUTTON_PUSH,"sayhello") process_events byebye: bye sayhello: firstname$=ed_firstname!.getText() lastname$=ed_lastname!.getText() a=msgbox("Hello "+firstname$+" "+lastname$,64,"Hello World") return