- Clarence Chamorro
- PowerBuilder
- Wednesday, 3 January 2024 10:51 PM UTC
I'm using PB 2022 R2 Build 2828. I upgraded the PFC version correlate with PB 2022.
So I have a window with the inv_resize active. Everything is working perfect. The dw are resizing perfect the columns are resizing (construction event register every column with the correct %) Every is working perfect. We have 4 different data presentations, means we change the datawindow object thru a clicked event of a radio button.
Radio button clicked event:
//==================================
dw_7.dataobject = 'd_bid_product_list_group_1_data'
//CCH OPENING A CHANELL BETWEN DATABASE AND DATAWINDOW
dw_7.SetTransObject(sqlca)
inv_resize.of_UnRegister(tab_1.tabpage_2.tab_2.tabpage_12.dw_7)
dw_7.of_setresize(false)
inv_resize.of_Register(tab_1.tabpage_2.tab_2.tabpage_12.dw_7,0,0,100,70)
dw_7.triggerevent('constructor')
dw_7.retrieve(tab_1.tabpage_1.dw_1.OBJECT.bid_project_code[1])
IF dw_21.dataobject = 'd_bid_product_component_list_view_sumary' THEN
dw_21.retrieve(tab_1.tabpage_1.dw_1.OBJECT.bid_project_code[1],0)
ELSE
dw_21.retrieve(tab_1.tabpage_1.dw_1.OBJECT.bid_project_code[1],gstr_gen.compcode,0)
END IF
dw_7.TriggerEvent('resize')
//======================================
My issue is if I change the datawindow object with the window's size bigger than normal the columns do not resize according the size of the window, datawindow. The actual datawindow risizes with no issue but the columns do not.
Here the construction event of the datawindow. Depending which dataobject is I register the columns accordingly:
//==============================================================
//CCH OPENING A CHANELL BETWEN DATABASE AND DATAWINDOW
this.SetTransObject(sqlca)
// Start the Row Manager Service.
of_SetRowManager(true)
// Start the Row Selection Service.
of_SetRowSelect(true)
// Set the Row Selection Service to allow multiple
// record selection.
inv_rowselect.of_SetStyle(inv_rowselect.Extended)
//ACTIVATE THE SORT SERVICE FOR THE DATA WINDOW
OF_SETSORT(True)
THIS.INV_SORT.OF_SETSTYLE(1)
THIS.INV_SORT.OF_SETCOLUMNHEADER(TRUE)
//CCH DEACTIVATE THE RIGHT MOUSE BUTTOM PFC FUNCTIONALITY
ib_RMBmenu = FALSE
//CCH TELLING PROCESSING THIS DW IS NOT UPDATEABLE
//this.of_SetUpdateable(FALSE)
//CCH TURN ON RESIZE SERVICE
of_SetResize(true)
IF this.dataobject = 'd_bid_product_list_group_1_data' THEN //cch presentation product type
//// Args - PercentageX, PercentageY, PercentageWidth, PercentageHeight
inv_resize.of_Register('tbl_bid_products_line_number_t', 0, 0, 5, 0)
inv_resize.of_Register('tbl_bid_products_line_number', 0, 0, 5, 0)
inv_resize.of_Register('key1_t',5, 0,5, 0)
inv_resize.of_Register('key1', 5, 0, 5, 0)
inv_resize.of_register( 'c_bid_number',10,0,20,0)
inv_resize.of_Register('c_prod_name_t',10,0, 20, 0)
inv_resize.of_register("c_product_type",10,0,20,0)
inv_resize.of_Register('c_prod_name', 10, 0, 20, 0)
inv_resize.of_Register('tbl_bid_products_bid_prod_size_t',30,0,15, 0)
inv_resize.of_Register('tbl_bid_products_bid_prod_size', 30, 0, 15, 0)
inv_resize.of_Register('unit_mesur_t',45,0, 5, 0)
inv_resize.of_Register('unit_mesur', 45, 0, 5, 0)
inv_resize.of_Register('revise_qty_t',50,0, 5, 0)
inv_resize.of_Register('revise_qty', 50, 0, 5, 0)
inv_resize.of_register('c_revise_qty_sum',50,0,5,0)
inv_resize.of_Register('contract_qty_t',55,0, 5, 0)
inv_resize.of_Register('contract_qty', 55, 0, 5, 0)
inv_resize.of_register('c_contractqty_sum',55,0,5,0)
inv_resize.of_Register('ourcost_t',60,0, 5, 0)
inv_resize.of_Register('ourcost', 60, 0,5, 0)
inv_resize.of_Register('total_cost_per_unit_t',65,0, 10, 0)
inv_resize.of_Register('total_cost_per_unit', 65, 0, 10, 0)
inv_resize.of_register('c_total_cost_perunit_by_prodtype',65,0,10,0)
inv_resize.of_register('grand_total_cost',65,0,10,0)
inv_resize.of_Register('contract_price_t',75,0, 10, 0)
inv_resize.of_Register('contract_price', 75, 0, 10, 0)
inv_resize.of_Register('total_contract_price_t',85,0, 10, 0)
inv_resize.of_Register('total_contract_price', 85, 0, 10, 0)
inv_resize.of_register('c_total_per_productype_contractprice',85 ,0, 10, 0)
inv_resize.of_Register('grand_total_contract_price', 85, 0, 10, 0)
inv_resize.of_Register('tbl_bid_products_has_component_y_n',95,0, 5, 0)
ELSEIF this.dataobject = 'd_bid_product_list' THEN //cch presentation regular
//// Args - PercentageX, PercentageY, PercentageWidth, PercentageHeight
//
inv_resize.of_Register('tbl_bid_products_line_number_t', 0, 0, 5, 0)
inv_resize.of_Register('tbl_bid_products_line_number', 0, 0, 5, 0)
inv_resize.of_Register('key1_t',5, 0,5, 0)
inv_resize.of_Register('key1', 5, 0, 5, 0)
inv_resize.of_register( 'c_bid_number',10,0,20,0)
inv_resize.of_Register('c_prod_name_t',10,0, 20, 0)
inv_resize.of_Register('c_prod_name', 10, 0, 20, 0)
inv_resize.of_Register('tbl_bid_products_bid_prod_size_t',30,0,15, 0)
inv_resize.of_Register('tbl_bid_products_bid_prod_size', 30, 0, 15, 0)
inv_resize.of_Register('unit_mesur_t',45,0, 5, 0)
inv_resize.of_Register('unit_mesur', 45, 0, 5, 0)
inv_resize.of_Register('revise_qty_t',50,0, 5, 0)
inv_resize.of_Register('revise_qty', 50, 0, 5, 0)
inv_resize.of_Register('contract_qty_t',55,0, 5, 0)
inv_resize.of_Register('contract_qty', 55, 0, 5, 0)
inv_resize.of_Register('ourcost_t',60,0, 5, 0)
inv_resize.of_Register('ourcost', 60, 0,5, 0)
inv_resize.of_Register('total_cost_per_unit_t',65,0, 10, 0)
inv_resize.of_Register('total_cost_per_unit', 65, 0, 10, 0)
inv_resize.of_register('grand_total_cost',65,0,10,0)
inv_resize.of_Register('contract_price_t',75,0, 10, 0)
inv_resize.of_Register('contract_price', 75, 0, 10, 0)
inv_resize.of_Register('total_contract_price_t',85,0, 10, 0)
inv_resize.of_Register('total_contract_price', 85, 0, 10, 0)
inv_resize.of_Register('grand_total_contract_price', 85, 0, 10, 0)
inv_resize.of_Register('tbl_bid_products_has_component_y_n',95,0, 5, 0)
ELSEIF this.dataobject = 'd_bid_product_list_group_1_data_phase_order1' THEN
//// Args - PercentageX, PercentageY, PercentageWidth, PercentageHeight
//
inv_resize.of_Register('tbl_bid_products_line_number_t', 0, 0, 5, 0)
inv_resize.of_Register('tbl_bid_products_line_number', 0, 0, 5, 0)
inv_resize.of_Register('key1_t',5, 0,5, 0)
inv_resize.of_Register('key1', 5, 0, 5, 0)
inv_resize.of_register( 'c_bid_number',10,0,20,0)
inv_resize.of_Register('c_prod_name_t',10,0, 20, 0)
inv_resize.of_register('c_phase',10,0,20,0)
inv_resize.of_Register('c_prod_name', 10, 0, 20, 0)
inv_resize.of_Register('tbl_bid_products_bid_prod_size_t',30,0,15, 0)
inv_resize.of_register("c_product_type",30,0,15,0)
inv_resize.of_Register('tbl_bid_products_bid_prod_size', 30, 0, 15, 0)
inv_resize.of_Register('unit_mesur_t',45,0,10, 0)
inv_resize.of_Register('unit_mesur', 45, 0, 10, 0)
// inv_resize.of_Register('revise_qty_t',50,0, 5, 0)
// inv_resize.of_Register('revise_qty', 50, 0, 5, 0)
// inv_resize.of_register('c_revise_qty_sum',50,0,5,0)
inv_resize.of_Register('contract_qty_t',55,0, 5, 0)
inv_resize.of_Register('contract_qty', 55, 0, 5, 0)
inv_resize.of_register('c_contractqty_sum',55,0,5,0)
inv_resize.of_Register('ourcost_t',60,0, 5, 0)
inv_resize.of_Register('ourcost', 60, 0,5, 0)
inv_resize.of_Register('total_cost_per_unit_t',65,0, 10, 0)
inv_resize.of_Register('total_cost_per_unit', 65, 0, 10, 0)
inv_resize.of_register('c_subtotal_cost_byproductype',65,0,10,0)
inv_resize.of_register('c_total_cost_perunit_by_phase',65,0,10,0)
inv_resize.of_register('grand_total_cost',65,0,10,0)
inv_resize.of_Register('contract_price_t',75,0, 10, 0)
inv_resize.of_Register('contract_price', 75, 0, 10, 0)
inv_resize.of_Register('total_contract_price_t',85,0, 10, 0)
inv_resize.of_Register('total_contract_price', 85, 0, 10, 0)
inv_resize.of_register('c_subtotal_contractprice_byproductype',85,0,10,0)
inv_resize.of_register('c_total_per_phase_contractprice',85,0,10,0)
inv_resize.of_Register('grand_total_contract_price', 85, 0, 10, 0)
inv_resize.of_Register('tbl_bid_products_has_component_y_n',95,0, 5, 0)
ELSEIF this.dataobject = 'd_bid_product_list_group_1_paid_item' THEN
//// Args - PercentageX, PercentageY, PercentageWidth, PercentageHeight
//
inv_resize.of_Register('tbl_bid_products_line_number_t', 0, 0, 5, 0)
inv_resize.of_Register('tbl_bid_products_line_number', 0, 0, 5, 0)
inv_resize.of_Register('key1_t',5, 0,5, 0)
inv_resize.of_Register('key1', 5, 0, 5, 0)
inv_resize.of_register( 'c_bid_number',10,0,20,0)
inv_resize.of_Register('c_prod_name_t',10,0, 20, 0)
inv_resize.of_register('c_paiditem',10,0,20,0)
inv_resize.of_Register('c_prod_name', 10, 0, 20, 0)
inv_resize.of_Register('tbl_bid_products_bid_prod_size_t',30,0,15, 0)
inv_resize.of_Register('tbl_bid_products_bid_prod_size', 30, 0, 15, 0)
inv_resize.of_Register('unit_mesur_t',45,0, 5, 0)
inv_resize.of_Register('unit_mesur', 45, 0, 5, 0)
inv_resize.of_Register('revise_qty_t',50,0, 5, 0)
inv_resize.of_Register('revise_qty', 50, 0, 5, 0)
inv_resize.of_Register('contract_qty_t',55,0, 5, 0)
inv_resize.of_Register('contract_qty', 55, 0, 5, 0)
inv_resize.of_Register('ourcost_t',60,0, 5, 0)
inv_resize.of_Register('ourcost', 60, 0,5, 0)
inv_resize.of_Register('total_cost_per_unit_t',65,0, 10, 0)
inv_resize.of_Register('total_cost_per_unit', 65, 0, 10, 0)
inv_resize.of_register('c_total_cost_perunit_by_paiditem',65,0,10,0)
inv_resize.of_register('grand_total_cost',65,0,10,0)
inv_resize.of_Register('contract_price_t',75,0, 10, 0)
inv_resize.of_Register('contract_price', 75, 0, 10, 0)
inv_resize.of_Register('total_contract_price_t',85,0, 10, 0)
inv_resize.of_Register('total_contract_price', 85, 0, 10, 0)
inv_resize.of_register('c_total_per_payitem_contractprice',85,0,10,0)
inv_resize.of_Register('grand_total_contract_price', 85, 0, 10, 0)
inv_resize.of_Register('tbl_bid_products_has_component_y_n',95,0, 5, 0)
END IF
//==========================================================
I think I am missing something in my code. Any advise will be greatly appreciated.
Regards,
Clarence.
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.