Datawindow Script Collection In Powerbuilder
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 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | /*------------------------------------------------------------ */ //Change color OF group WITH color columns Transparent . /*------------------------------------------------------------ */ Modify( "DataWindow.detail.Color=65535") Modify( "DataWindow.detail.height=73") /*------------------------------------------------------------ */ //Adjust the height OF each band in dw. /*------------------------------------------------------------ */ Modify( "DataWindow.header.height=73 DataWindow.footer.height =1") Modify( "DataWindow.detail.height=73 DataWindow.summary.height=1") /*------------------------------------------------------------ */ //Adjust the height OF the second group OF trailers TO 500. /*------------------------------------------------------------ */ dw_1.Object.DataWindow.Trailer.2.Height = 500 /*------------------------------------------------------------ */ //Change AND get attributes OF dw /*------------------------------------------------------------ */ //Modify Accelerator OF emp_name dw_1.Object.emp_name.Accelerator = "A" dw_1.Modify( "emp_name.Accelerator= 'A '") /*------------------------------------------------------------ */ //Modify Alignment OF emp_name /*------------------------------------------------------------ */ dw_1.Object.emp_name.Alignment = "1"//1: left 2: center 3: right dw_1.Modify( "emp_name.Alignment= '1 '") /*------------------------------------------------------------ */ //Modify Background Color OF graph_1 /*------------------------------------------------------------ */ dw_1.Object.graph_1.BackColor = 250 dw_1.Modify( "graph_1.BackColor=250") dw_1.Object.oval_1.Background.Color = RGB(255, 0, 128) dw_1.Modify( "emp_name.Background.Color= '123456 '") dw_1.Modify( "emp_name.Background.Mode= '1 '") //0: Opaque 1: Transparent /*------------------------------------------------------------ */ //Setting Color /*------------------------------------------------------------ */ ll_color = RGB(200, 200, 200) dw_1.Modify( "DataWindow.Header.2.Color="+ String(ll_color)) /*------------------------------------------------------------ */ //Find Band OF emp_name /*------------------------------------------------------------ */ ls_data = dw_1.Object.emp_name.Band ls_data = dw_1.Describe( "emp_name.Band") //Get DataWindow Band //dw_1.Object.DataWindow.Bands dw_1.Describe( "DataWindow.Bands") /*------------------------------------------------------------ */ //Find height OF detail /*------------------------------------------------------------ */ ls_data = dw_1.Object.DataWindow.Detail.Height /*------------------------------------------------------------ */ //Setting Pointer /*------------------------------------------------------------ */ dw_1.Object.DataWindow.Detail.Pointer = "hand.cur" /*------------------------------------------------------------ */ //Get BitmapName OF specific Object. /*------------------------------------------------------------ */ ll_data = dw_1.Object.emp_name.BitmapName ll_data = dw_1.Describe( "emp_name.BitmapName") /*------------------------------------------------------------ */ //Get the Border OF emp_name_t. /*------------------------------------------------------------ */ ls_data = dw_1.Object.emp_name_t.Border //0:none 1:Shadow 2:Rectangle 3:Resize 4:Line 5:3D Lowered 6:3D Raised dw_1.Object.emp_name_t.Border= '6' /*------------------------------------------------------------ */ //Control CheckBox /*------------------------------------------------------------ */ dw_1.Object.emp_gender.CheckBox.3D = "no" dw_1.Modify( "emp_status.CheckBox.off= 'Terminated '") dw_1.Modify( "emp_status.CheckBox.off= 'Active '") dw_1.Modify( "emp_status.CheckBox.off= 'Unknown '") /*------------------------------------------------------------ */ //Get the number OF columns used in DataWindow. /*------------------------------------------------------------ */ ls_cunt = dw_1.Object.DataWindow.Column.Count ls_cunt = dw_1.Describe( "DataWindow.Column.Count") |
Good Luck!