Ultimate Suite for PowerBuilder には、シングル ページ アプリケーションを作成するために使用できる 3 つのウィンドウ オブジェクトが含まれています。
シングル ページ アプリケーションとは、1 つのウィンドウ(またはページ)内にすべての機能または大部分の機能を表示するアプリケーションです。
このウィンドウは最も基本的な機能を提供します。ウィンドウのキャプションにはツールバー項目があり、下部にはステータスバーがあります。
構築済みのナビゲーションでは、ユーザーに表示したいユーザーオブジェクトごとに1つの関数を呼び出すだけで済みます。左側でナビゲーション項目が選択されると、対応するユーザーオブジェクトがウィンドウに表示されます。機能を拡張するために、ツールバー項目をウィンドウ キャプションに追加できます。
//Instance Variables u_cst_dashboard iuo_dashboard u_cst_employee iuo_employee u_cst_sales_order iuo_order u_cst_tilemenu iuo_tilemenu u_cst_about iuo_about u_cst_credits iuo_credits //Open event of window of_SetWindowIcon("icons\PBUS logo 24x24.png" ) of_SetCopyright("Copyright © 2020 Werysoft Inc." ) of_AddPanel("Dashboard", "icons\dashboard.png" , iuo_dashboard) of_AddPanel("Tile Menu", "icons\tilemenu.png" , iuo_tilemenu) of_AddPanel("Employee", "icons\open_employee 32x32.png" , iuo_employee) of_AddPanel("Orders", "icons\order 32x32.png" , iuo_order) of_AddPanel("About", "icons\about 16x16.png", iuo_about) of_SelectPanel("Dashboard") of_SetTheme("WINDOWS10_BLUE") of_AddToolbarItem("Save","icons\save white.png" ) of_AddToolbarItem("Print","icons\print white.png" ) of_AddToolbarItem("Print Preview","icons\print preview white.png" ) of_AddToolbarSeparator() of_AddToolbarItem("New Employee","icons\add_employee white.png" ) of_AddToolbarItem("Remove Employee","icons\remove_employee white.png" ) of_AddToolbarSeparator() of_AddToolbarItem("New Order","icons\add_order white.png" ) of_AddToolbarItem("Remove Order","icons\remove_order white.png" )
タブ付きキャプションウィンドウの動作は、最もモダンな最新のWebブラウザと非常によく似ています。開いている各ウィンドウは、ウィンドウのキャプション内にタブとして表示されます。必要に応じて、ユーザーが新しいタブを開くためのボタンを表示できます。このウィンドウは、各タブでは、任意のタイプのユーザーオブジェクトやウィンドウ オブジェクトを各タブ内で開くことができますが、単一目的のページ(Webブラウザのようなもの)に最適です。
//Open event of window w_sql lw_sql of_OpenTab(lw_sql, "New Query", "SQL!") //AddTabButtonClicked event //Open a new tab similar to how we automatically opened one in the open event w_sql lw_sql of_OpenTab(lw_sql, "New Query", "SQL!") //TabClosed event //If there are no more tabs opened, we can close the whole window. IF of_GetTabCount() = 0 THEN POST Close(THIS) END IF
ノート:このリリースでは、PowerBuilder メニュー オブジェクトはサポートされていません。将来的には、代替メニューが追加される可能性があります。
既知の問題:ウィンドウを開いたときにウィンドウを最大化して表示したい場合は、以下をウィンドウのOpenイベントの先頭に追加する必要があります。
THIS.WindowState = Maximized!