Multiple Select Option For The Datawindow Dropdown In PowerBuilder
DropDownDatawindow Multi Select In PowerBuilder
Important: Checked “Allways Show List” Properties Of Column Dropdowndw On Datawindow
Create nvo_dddw_multiselect from nonvisualobject:
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 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 |
forward global type nvo_dddw_multiselect from nonvisualobject end type type str_data from structure within nvo_dddw_multiselect end type end forward type str_data from structure string column long row string data[] string display[] long dwcrow[] end type global type nvo_dddw_multiselect from nonvisualobject end type global nvo_dddw_multiselect nvo_dddw_multiselect type variables Private str_data istr_data[] datawindow idw String is_separator Boolean ib_dwcreset end variables forward prototypes public function string of_value (datawindowchild adwc, string as_cln, long al_row) public function integer of_multiselect (datawindow adw, string as_cln, string as_chkcln) public function integer of_multiselect (string as_cln, string as_chkcln) public function integer of_multiselect (string as_cln, string as_chkcln, string as_separator) public subroutine of_setcheckbox (datawindow adw, string as_cln, string as_chkcln) public subroutine of_setcheckbox (string as_cln, string as_chkcln) public function integer of_str_data (string as_cln, long al_row) public function integer of_multiselect (datawindow adw, string as_cln, string as_chkcln, string as_separator) public function integer of_getdata (string as_cln, long al_row, ref string as_data[]) public function integer of_getdisplay (string as_cln, long al_row, ref string as_display[]) public function integer of_resetcheckbox (datawindow adw, long al_row, string as_cln, string as_chkcln, boolean ab_dwcreset) public function integer of_resetcheckbox (long al_row, string as_cln, string as_chkcln, boolean ab_dwcreset) public function integer of_resetcheckbox (long al_row, string as_cln, string as_chkcln) public function integer of_resetcheckbox (datawindow adw, long al_row, string as_cln, string as_chkcln) public subroutine of_ini (datawindow adw, string as_separator, boolean ab_dwcreset) end prototypes public function string of_value (datawindowchild adwc, string as_cln, long al_row);//==================================================================== // Function: nvo_dddw_multiselect.() //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // datawindowchild adwc // string as_cln // long al_row //-------------------------------------------------------------------- // Returns: (none) //-------------------------------------------------------------------- // Author: PB.BaoGa Date: 2021/03/22 //-------------------------------------------------------------------- // Usage: nvo_dddw_multiselect. //-------------------------------------------------------------------- // Copyright (c) PB.BaoGa(TM), All rights reserved. //-------------------------------------------------------------------- // Modify History: // //==================================================================== String ls_value , ls_col_type ls_value = "" ls_col_type = Lower(Left(adwc.Describe(as_cln + ".coltype"), 5)) Choose Case ls_col_type Case "numbe", "long", "ulong", "real", "int", "decim" ls_value = String(adwc.GetItemNumber(al_row, as_cln)) Case "char(", "char" ls_value = adwc.GetItemString(al_row, as_cln) Case "datet", "times" ls_value = String(adwc.GetItemDateTime(al_row, as_cln)) Case "date" ls_value = String(adwc.GetItemDate(al_row, as_cln)) Case "time" ls_value = String(adwc.GetItemTime(al_row, as_cln)) End Choose Return ls_value end function public function integer of_multiselect (datawindow adw, string as_cln, string as_chkcln);//==================================================================== // Function: nvo_dddw_multiselect.() //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // datawindow adw // string as_cln // string as_chkcln //-------------------------------------------------------------------- // Returns: (none) //-------------------------------------------------------------------- // Author: PB.BaoGa Date: 2021/03/22 //-------------------------------------------------------------------- // Usage: nvo_dddw_multiselect. //-------------------------------------------------------------------- // Copyright (c) PB.BaoGa(TM), All rights reserved. //-------------------------------------------------------------------- // Modify History: // //==================================================================== Int li_Return If IsNull(is_separator) Or Len(Trim(is_separator)) = 0 Then is_separator = "" li_Return = of_multiselect(adw, as_cln, as_chkcln, is_separator) Return li_Return end function public function integer of_multiselect (string as_cln, string as_chkcln);//==================================================================== // Function: nvo_dddw_multiselect.() //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // string as_cln // string as_chkcln //-------------------------------------------------------------------- // Returns: (none) //-------------------------------------------------------------------- // Author: PB.BaoGa Date: 2021/03/22 //-------------------------------------------------------------------- // Usage: nvo_dddw_multiselect. //-------------------------------------------------------------------- // Copyright (c) PB.BaoGa(TM), All rights reserved. //-------------------------------------------------------------------- // Modify History: // //==================================================================== Int li_Return li_Return = of_multiselect(idw, as_cln, as_chkcln) Return li_Return end function public function integer of_multiselect (string as_cln, string as_chkcln, string as_separator);//==================================================================== // Function: nvo_dddw_multiselect.() //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // string as_cln // string as_chkcln // string as_separator //-------------------------------------------------------------------- // Returns: (none) //-------------------------------------------------------------------- // Author: PB.BaoGa Date: 2021/03/22 //-------------------------------------------------------------------- // Usage: nvo_dddw_multiselect. //-------------------------------------------------------------------- // Copyright (c) PB.BaoGa(TM), All rights reserved. //-------------------------------------------------------------------- // Modify History: // //==================================================================== Int li_Return li_Return = of_multiselect(idw, as_cln, as_chkcln, as_separator) Return li_Return end function public subroutine of_setcheckbox (datawindow adw, string as_cln, string as_chkcln);//==================================================================== // Function: nvo_dddw_multiselect.() //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // datawindow adw // string as_cln // string as_chkcln //-------------------------------------------------------------------- // Returns: (none) //-------------------------------------------------------------------- // Author: PB.BaoGa Date: 2021/03/22 //-------------------------------------------------------------------- // Usage: nvo_dddw_multiselect. //-------------------------------------------------------------------- // Copyright (c) PB.BaoGa(TM), All rights reserved. //-------------------------------------------------------------------- // Modify History: // //==================================================================== datawindowchild ldwc adw.GetChild(as_cln, ldwc) ldwc.Modify( as_chkcln +".tabsequence =10") end subroutine public subroutine of_setcheckbox (string as_cln, string as_chkcln);of_setcheckbox(idw, as_cln , as_chkcln) end subroutine public function integer of_str_data (string as_cln, long al_row);//==================================================================== // Function: nvo_dddw_multiselect.() //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // string as_cln // long al_row //-------------------------------------------------------------------- // Returns: (none) //-------------------------------------------------------------------- // Author: PB.BaoGa Date: 2021/03/22 //-------------------------------------------------------------------- // Usage: nvo_dddw_multiselect. //-------------------------------------------------------------------- // Copyright (c) PB.BaoGa(TM), All rights reserved. //-------------------------------------------------------------------- // Modify History: // //==================================================================== Int li_r, li_return long ll_row String ls_cln For li_r = 1 To UpperBound(istr_data) ls_cln = istr_data[li_r].column ll_row = istr_data[li_r].row If Lower(Trim(ls_cln)) = Lower(Trim(as_cln)) And ll_row = al_row Then li_return = li_r Exit End If Next If li_return < 1 Then istr_data[UpperBound(istr_data)+1].column = as_cln istr_data[UpperBound(istr_data)+1].row = al_row li_return = UpperBound(istr_data) End If Return li_return end function public function integer of_multiselect (datawindow adw, string as_cln, string as_chkcln, string as_separator);//==================================================================== // Function: nvo_dddw_multiselect.() //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // datawindow adw // string as_cln // string as_chkcln // string as_separator //-------------------------------------------------------------------- // Returns: (none) //-------------------------------------------------------------------- // Author: PB.BaoGa Date: 2021/03/22 //-------------------------------------------------------------------- // Usage: nvo_dddw_multiselect. //-------------------------------------------------------------------- // Copyright (c) PB.BaoGa(TM), All rights reserved. //-------------------------------------------------------------------- // Modify History: // //==================================================================== Int li_return, li_cln, li_str Long ll_dwcrowcount, ll_dwcrow , ll_adwrow, ll_valuerow String ls_adwcln, ls_chkcln, ls_value, ls_display_value, ls_data_value, ls_temp_display String ls_editstyle, ls_check_on, ls_check_off, ls_display_cln, ls_data_cln String ls_search_expr datawindowchild ldwc str_data lstr_data //check mail infor If Not IsValid(adw) Then Return -1 If adw.RowCount() = 0 Then Return 0 ll_adwrow = adw.GetRow() If ll_adwrow < 1 Then Return 0 li_cln = adw.GetColumn() ls_adwcln = adw.Describe("#" + String(li_cln) + ".name") If IsNull(ls_adwcln) Or Len(Trim(ls_adwcln)) = 0 Then ls_adwcln = "" If Upper(Trim(ls_adwcln)) <> Upper(Trim(as_cln)) Then Return 0 ls_editstyle = Lower(Trim(adw.Describe(as_cln + ".Edit.Style"))) If ls_editstyle <> "dddw" Then Return 0 ls_display_cln = adw.Describe( as_cln + ".dddw.DisplayColumn") ls_data_cln = adw.Describe( as_cln + ".dddw.DataColumn") //check datachild infor adw.GetChild(as_cln, ldwc) If Not IsValid(ldwc) Then Return -1 li_cln = ldwc.GetColumn() ls_chkcln = ldwc.Describe("#" + String(li_cln) + ".name") If Upper(Trim(ls_chkcln)) <> Upper(Trim(as_chkcln)) Then Return 0 ls_editstyle = Lower(Trim(ldwc.Describe(as_chkcln + '.Edit.Style'))) If ls_editstyle <> "checkbox" Then Return 0 ls_check_on = ldwc.Describe (as_chkcln + ".CheckBox.On") ls_check_off = ldwc.Describe (as_chkcln + ".CheckBox.Off") //get value li_str = of_str_data(as_cln, ll_adwrow) lstr_data.column = as_cln lstr_data.row = ll_adwrow istr_data[li_str] = lstr_data ldwc.AcceptText() ls_value = "" ll_dwcrow = 0 ll_dwcrowcount = ldwc.RowCount() ls_search_expr = as_chkcln + "='" + ls_check_on + "'" Do While True ll_dwcrow = ldwc.Find(ls_search_expr, ll_dwcrow + 1, ll_dwcrowcount) If ll_dwcrow = 0 Then Exit ll_valuerow ++ If Len(ls_value) > 0 Then ls_value += as_separator End If ls_display_value = of_value(ldwc, ls_display_cln , ll_dwcrow) ls_data_value = of_value(ldwc, ls_data_cln , ll_dwcrow) lstr_data.display[UpperBound(lstr_data.display) + 1] = ls_display_value lstr_data.Data[UpperBound(lstr_data.Data) + 1] = ls_data_value lstr_data.dwcrow[UpperBound(lstr_data.dwcrow) + 1] = ll_dwcrow ls_temp_display = ls_display_value If Len(ls_display_value ) > 6 Then ls_display_value = Left(ls_display_value, 6) + '..' End If ls_value = ls_value + ls_display_value If ll_dwcrow >= ll_dwcrowcount Then Exit Loop If ll_valuerow = 1 Then ls_value = ls_temp_display End If istr_data[li_str] = lstr_data adw.SetItem(ll_adwrow,as_cln, ls_value) Return li_return end function public function integer of_getdata (string as_cln, long al_row, ref string as_data[]);//==================================================================== // Function: nvo_dddw_multiselect.() //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // string as_cln // long al_row // ref string as_data[] //-------------------------------------------------------------------- // Returns: (none) //-------------------------------------------------------------------- // Author: PB.BaoGa Date: 2021/03/22 //-------------------------------------------------------------------- // Usage: nvo_dddw_multiselect. //-------------------------------------------------------------------- // Copyright (c) PB.BaoGa(TM), All rights reserved. //-------------------------------------------------------------------- // Modify History: // //==================================================================== Int li_return, li_str li_str = of_str_data(as_cln, al_row ) as_data = istr_data[li_str].Data li_return = UpperBound(as_data) Return li_return end function public function integer of_getdisplay (string as_cln, long al_row, ref string as_display[]);//==================================================================== // Function: nvo_dddw_multiselect.() //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // string as_cln // long al_row // ref string as_display[] //-------------------------------------------------------------------- // Returns: (none) //-------------------------------------------------------------------- // Author: PB.BaoGa Date: 2021/03/22 //-------------------------------------------------------------------- // Usage: nvo_dddw_multiselect. //-------------------------------------------------------------------- // Copyright (c) PB.BaoGa(TM), All rights reserved. //-------------------------------------------------------------------- // Modify History: // //==================================================================== Int li_return, li_str li_str = of_str_data(as_cln, al_row ) as_display = istr_data[li_str].display li_return = UpperBound(as_display) Return li_return end function public function integer of_resetcheckbox (datawindow adw, long al_row, string as_cln, string as_chkcln, boolean ab_dwcreset);//==================================================================== // Function: nvo_dddw_multiselect.() //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // datawindow adw // long al_row // string as_cln // string as_chkcln // boolean ab_dwcreset //-------------------------------------------------------------------- // Returns: (none) //-------------------------------------------------------------------- // Author: PB.BaoGa Date: 2021/03/22 //-------------------------------------------------------------------- // Usage: nvo_dddw_multiselect. //-------------------------------------------------------------------- // Copyright (c) PB.BaoGa(TM), All rights reserved. //-------------------------------------------------------------------- // Modify History: // //==================================================================== If Not ab_dwcreset Then Return 1 Int li_return, li_cln, li_str Long ll_dwcrowcount, ll_dwcrow , ll_adwrow, ll_dwcrow1 String ls_adwcln, ls_chkcln, ls_display_value, ls_data_value String ls_editstyle, ls_check_on, ls_check_off, ls_display_cln, ls_data_cln String ls_search_expr datawindowchild ldwc str_data lstr_data //check mail infor If Not IsValid(adw) Then Return -1 If adw.RowCount() = 0 Then Return 0 ll_adwrow = adw.GetRow() If ll_adwrow < 1 Then Return 0 li_cln = adw.GetClickedColumn() ls_adwcln = adw.Describe("#" + String(li_cln) + ".name") If IsNull(ls_adwcln) Or Len(Trim(ls_adwcln)) = 0 Then ls_adwcln = "" If Upper(Trim(ls_adwcln)) <> Upper(Trim(as_cln)) Then Return 0 ls_editstyle = Lower(Trim(adw.Describe(as_cln + ".Edit.Style"))) If ls_editstyle <> "dddw" Then Return 0 ls_display_cln = adw.Describe( as_cln + ".dddw.DisplayColumn") ls_data_cln = adw.Describe( as_cln + ".dddw.DataColumn") //check datachild infor adw.GetChild(as_cln, ldwc) If Not IsValid(ldwc) Then Return -1 ls_editstyle = Lower(Trim(ldwc.Describe(as_chkcln + '.Edit.Style'))) If ls_editstyle <> "checkbox" Then Return 0 ls_check_on = ldwc.Describe (as_chkcln + ".CheckBox.On") ls_check_off = ldwc.Describe (as_chkcln + ".CheckBox.Off") //reset dddw ll_dwcrow = 0 ll_dwcrowcount = ldwc.RowCount() ls_search_expr = as_chkcln + "='" + ls_check_on + "'" Do While True ll_dwcrow = ldwc.Find(ls_search_expr, ll_dwcrow + 1, ll_dwcrowcount) If ll_dwcrow = 0 Then Exit ldwc.SetItem(ll_dwcrow,as_chkcln, ls_check_off) If ll_dwcrow >= ll_dwcrowcount Then Exit Loop //get value li_str = of_str_data(as_cln, al_row) lstr_data = istr_data[li_str] For ll_dwcrow = 1 To UpperBound(lstr_data.dwcrow) ls_data_value = lstr_data.Data[ll_dwcrow] ll_dwcrow1 = lstr_data.dwcrow[ll_dwcrow] If ll_dwcrow1 > ll_dwcrowcount Then Continue If ls_data_value <> of_value( ldwc, ls_data_cln , ll_dwcrow1) Then Continue ldwc.SetItem(ll_dwcrow1, as_chkcln, ls_check_on) Next Return 1 end function public function integer of_resetcheckbox (long al_row, string as_cln, string as_chkcln, boolean ab_dwcreset);Int li_return li_return = of_resetcheckbox(idw,al_row, as_cln, as_chkcln, ab_dwcreset) Return li_return end function public function integer of_resetcheckbox (long al_row, string as_cln, string as_chkcln);//==================================================================== // Function: nvo_dddw_multiselect.() //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // long al_row // string as_cln // string as_chkcln //-------------------------------------------------------------------- // Returns: (none) //-------------------------------------------------------------------- // Author: PB.BaoGa Date: 2021/03/22 //-------------------------------------------------------------------- // Usage: nvo_dddw_multiselect. //-------------------------------------------------------------------- // Copyright (c) PB.BaoGa(TM), All rights reserved. //-------------------------------------------------------------------- // Modify History: // //==================================================================== Int li_return li_return = of_resetcheckbox(al_row, as_cln, as_chkcln, ib_dwcreset) Return li_return end function public function integer of_resetcheckbox (datawindow adw, long al_row, string as_cln, string as_chkcln);//==================================================================== // Function: nvo_dddw_multiselect.() //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // datawindow adw // long al_row // string as_cln // string as_chkcln //-------------------------------------------------------------------- // Returns: (none) //-------------------------------------------------------------------- // Author: PB.BaoGa Date: 2021/03/22 //-------------------------------------------------------------------- // Usage: nvo_dddw_multiselect. //-------------------------------------------------------------------- // Copyright (c) PB.BaoGa(TM), All rights reserved. //-------------------------------------------------------------------- // Modify History: // //==================================================================== Int li_return li_return = of_resetcheckbox(idw,al_row, as_cln, as_chkcln, ib_dwcreset) Return li_return end function public subroutine of_ini (datawindow adw, string as_separator, boolean ab_dwcreset);//==================================================================== // Function: nvo_dddw_multiselect.() //-------------------------------------------------------------------- // Description: //-------------------------------------------------------------------- // Arguments: // datawindow adw // string as_separator // boolean ab_dwcreset //-------------------------------------------------------------------- // Returns: (none) //-------------------------------------------------------------------- // Author: PB.BaoGa Date: 2021/03/22 //-------------------------------------------------------------------- // Usage: nvo_dddw_multiselect. //-------------------------------------------------------------------- // Copyright (c) PB.BaoGa(TM), All rights reserved. //-------------------------------------------------------------------- // Modify History: // //==================================================================== idw = adw ib_dwcreset = ab_dwcreset If IsNull(as_separator) Or Len(Trim(as_separator)) = 0 Then as_separator = "," is_separator = as_separator end subroutine on nvo_dddw_multiselect.create call super::create TriggerEvent( this, "constructor" ) end on on nvo_dddw_multiselect.destroy TriggerEvent( this, "destructor" ) call super::destroy end on |
Create test window w_main
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 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
forward global type w_main from window end type type st_1 from statictext within w_main end type type cb_1 from commandbutton within w_main end type type dw_data from datawindow within w_main end type end forward global type w_main from window integer width = 3086 integer height = 956 boolean titlebar = true string title = "DropDown Datawindow Multi Select" boolean controlmenu = true boolean minbox = true boolean maxbox = true boolean resizable = true long backcolor = 67108864 string icon = "AppIcon!" boolean center = true st_1 st_1 cb_1 cb_1 dw_data dw_data end type global w_main w_main type variables nvo_dddw_multiselect invo_dddw_multiselect end variables on w_main.create this.st_1=create st_1 this.cb_1=create cb_1 this.dw_data=create dw_data this.Control[]={this.st_1,& this.cb_1,& this.dw_data} end on on w_main.destroy destroy(this.st_1) destroy(this.cb_1) destroy(this.dw_data) end on event open;dw_data.insertrow(0) dw_data.insertrow(0) dw_data.insertrow(0) end event type st_1 from statictext within w_main integer x = 512 integer y = 736 integer width = 2290 integer height = 64 integer textsize = -10 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" long textcolor = 33554432 long backcolor = 67108864 string text = "Note: Checked ~"Allways Show List~" Properties Of Column Dropdowndw On Datawindow" boolean focusrectangle = false end type type cb_1 from commandbutton within w_main integer x = 37 integer y = 704 integer width = 402 integer height = 112 integer taborder = 30 integer textsize = -10 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" string text = "Get Data" end type event clicked;Long ll_row, ll_count, ll_col String ls_data[], ls_value, ls_cln ll_col = dw_data.getcolumn() ls_cln = dw_data.Describe("#" + String(ll_col) + ".name") ll_count = invo_dddw_multiselect.of_getdata(ls_cln , dw_data.GetRow(), ls_data) ls_value = "" For ll_row = 1 To ll_count ls_value += ls_data[ll_row] + "~r~n" Next MessageBox("Infor",ls_value ) end event type dw_data from datawindow within w_main event ue_command pbm_command integer x = 41 integer y = 36 integer width = 2962 integer height = 640 integer taborder = 20 string title = "none" string dataobject = "d_main" boolean hscrollbar = true boolean vscrollbar = true boolean livescroll = true borderstyle borderstyle = stylelowered! end type event ue_command; Choose Case notificationcode Case 1281 This.Post Event ItemChanged( This.GetRow(), This.Object, '') End Choose end event event constructor;invo_dddw_multiselect = Create nvo_dddw_multiselect invo_dddw_multiselect.of_ini( This, ",", True) invo_dddw_multiselect.of_setcheckbox( This, "cln1", "chk") invo_dddw_multiselect.of_setcheckbox( This, "cln2", "chk") invo_dddw_multiselect.of_setcheckbox( This, "cln3", "chk") end event event itemchanged;int li_return li_return = invo_dddw_multiselect.of_multiselect ( "cln1", "chk") li_return = invo_dddw_multiselect.of_multiselect ( "cln2", "chk", "/") li_return = invo_dddw_multiselect.of_multiselect (This, "cln3", "chk", "-") return 2 end event event clicked;invo_dddw_multiselect.of_resetcheckbox( This, row,dwo.Name, "chk") end event |
Datawindow Example:
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 |
release 10.5; datawindow(units=0 timer_interval=0 color=1073741824 processing=1 HTMLDW=no print.printername="" print.documentname="" print.orientation = 0 print.margin.left = 110 print.margin.right = 110 print.margin.top = 96 print.margin.bottom = 96 print.paper.source = 0 print.paper.size = 0 print.canusedefaultprinter=yes print.prompt=no print.buttons=no print.preview.buttons=no print.cliptext=no print.overrideprintjob=no print.collate=yes print.preview.outline=yes hidegrayline=no grid.lines=0 selected.mouse=no ) header(height=80 color="536870912" ) summary(height=0 color="536870912" ) footer(height=0 color="536870912" ) detail(height=76 color="536870912" ) table(column=(type=char(1) updatewhereclause=yes name=chk dbname="chk" values=" Y/ N" ) column=(type=char(10) updatewhereclause=yes name=data1 dbname="data1" ) column=(type=char(10) updatewhereclause=yes name=data2 dbname="data2" ) column=(type=char(10) updatewhereclause=yes name=data3 dbname="data3" ) ) data(null "data11", "data21", "data31", null "data12", "data22", "data32", null "data13", "data23", "data33", null "data14", "data24", "data34", null "data15", "data25", "data35", ) text(band=header alignment="2" text="Chk" border="6" color="33554432" x="114" y="4" height="64" width="87" html.valueishtml="0" name=chk_t visible="1" font.face="Tahoma" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" ) text(band=header alignment="2" text="Data1" border="6" color="33554432" x="215" y="4" height="64" width="357" html.valueishtml="0" name=data1_t visible="1" font.face="Tahoma" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" ) text(band=header alignment="2" text="Data2" border="6" color="33554432" x="585" y="4" height="64" width="334" html.valueishtml="0" name=data2_t visible="1" font.face="Tahoma" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" ) text(band=header alignment="2" text="Data3" border="6" color="33554432" x="933" y="4" height="64" width="320" html.valueishtml="0" name=data3_t visible="1" font.face="Tahoma" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" ) compute(band=header alignment="2" expression="RowCount()"border="6" color="33554432" x="5" y="4" height="64" width="96" format="[General]" html.valueishtml="0" name=page_2 visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" ) compute(band=detail alignment="2" expression="Getrow()"border="6" color="33554432" x="5" y="4" height="64" width="96" format="[General]" html.valueishtml="0" name=page_1 visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" ) column(band=detail id=1 alignment="2" tabsequence=10 border="5" color="33554432" x="110" y="4" height="64" width="91" format="[general]" html.valueishtml="0" name=chk visible="1" checkbox.text="" checkbox.on="Y" checkbox.off="N" checkbox.scale=no checkbox.threed=yes font.face="Tahoma" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" ) column(band=detail id=2 alignment="0" tabsequence=20 border="5" color="33554432" x="215" y="4" height="64" width="357" format="[general]" html.valueishtml="0" name=data1 visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes font.face="Tahoma" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" ) column(band=detail id=3 alignment="0" tabsequence=30 border="5" color="33554432" x="585" y="4" height="64" width="334" format="[general]" html.valueishtml="0" name=data2 visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes font.face="Tahoma" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" ) column(band=detail id=4 alignment="0" tabsequence=40 border="5" color="33554432" x="933" y="4" height="64" width="320" format="[general]" html.valueishtml="0" name=data3 visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes font.face="Tahoma" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" ) htmltable(border="1" ) htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" encodeselflinkargs="1" netscapelayers="0" pagingmethod=0 generatedddwframes="1" ) xhtmlgen() cssgen(sessionspecific="0" ) xmlgen(inline="0" ) xsltgen() jsgen() export.xml(headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0 ) import.xml() export.pdf(method=0 distill.custompostscript="0" xslfop.print="0" ) export.xhtml() |
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 |
release 10.5; datawindow(units=0 timer_interval=0 color=67108864 processing=1 HTMLDW=no print.printername="" print.documentname="" print.orientation = 0 print.margin.left = 110 print.margin.right = 110 print.margin.top = 96 print.margin.bottom = 96 print.paper.source = 0 print.paper.size = 0 print.canusedefaultprinter=yes print.prompt=no print.buttons=no print.preview.buttons=no print.cliptext=no print.overrideprintjob=no print.collate=yes print.preview.outline=yes hidegrayline=no grid.lines=0 selected.mouse=no ) header(height=80 color="536870912" ) summary(height=0 color="536870912" ) footer(height=0 color="536870912" ) detail(height=80 color="536870912" ) table(column=(type=char(100) updatewhereclause=yes name=cln1 dbname="cln1" ) column=(type=char(100) updatewhereclause=yes name=cln2 dbname="cln2" ) column=(type=char(100) updatewhereclause=yes name=cln3 dbname="cln3" ) ) text(band=header alignment="2" text="Cln1" border="6" color="33554432" x="114" y="4" height="64" width="754" html.valueishtml="0" name=cln1_t visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) text(band=header alignment="2" text="Cln2" border="6" color="33554432" x="882" y="4" height="64" width="869" html.valueishtml="0" name=cln2_t visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) text(band=header alignment="2" text="Cln3" border="6" color="33554432" x="1765" y="4" height="64" width="946" html.valueishtml="0" name=cln3_t visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) compute(band=header alignment="2" expression="Rowcount()"border="6" color="33554432" x="5" y="4" height="64" width="96" format="[General]" html.valueishtml="0" name=page_2 visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) compute(band=detail alignment="2" expression="Getrow()"border="6" color="33554432" x="5" y="4" height="64" width="96" format="[General]" html.valueishtml="0" name=page_1 visible="1" font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) column(band=detail id=1 alignment="0" tabsequence=10 border="0" color="33554432" x="114" y="4" height="64" width="754" format="[general]" html.valueishtml="0" name=cln1 visible="1" dddw.name=d_ddw dddw.displaycolumn=data1 dddw.datacolumn=data1 dddw.percentwidth=180 dddw.lines=0 dddw.limit=0 dddw.allowedit=no dddw.useasborder=no dddw.case=any dddw.hscrollbar=yes dddw.vscrollbar=yes dddw.showlist=yes font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" ) column(band=detail id=2 alignment="0" tabsequence=20 border="0" color="33554432" x="882" y="4" height="64" width="869" format="[general]" html.valueishtml="0" name=cln2 visible="1" dddw.name=d_ddw dddw.displaycolumn=data2 dddw.datacolumn=data2 dddw.percentwidth=180 dddw.lines=0 dddw.limit=0 dddw.allowedit=no dddw.useasborder=no dddw.case=any dddw.hscrollbar=yes dddw.vscrollbar=yes dddw.showlist=yes font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" ) column(band=detail id=3 alignment="0" tabsequence=30 border="0" color="33554432" x="1765" y="4" height="64" width="946" format="[general]" html.valueishtml="0" name=cln3 visible="1" dddw.name=d_ddw dddw.displaycolumn=data3 dddw.datacolumn=data3 dddw.percentwidth=180 dddw.lines=0 dddw.limit=0 dddw.allowedit=no dddw.useasborder=no dddw.case=any dddw.hscrollbar=yes dddw.vscrollbar=yes dddw.showlist=yes font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="1073741824" ) htmltable(border="1" ) htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" encodeselflinkargs="1" netscapelayers="0" pagingmethod=0 generatedddwframes="1" ) xhtmlgen() cssgen(sessionspecific="0" ) xmlgen(inline="0" ) xsltgen() jsgen() export.xml(headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0 ) import.xml() export.pdf(method=0 distill.custompostscript="0" xslfop.print="0" ) export.xhtml() |
Find Projects On Github click here
Good Luck!
Useful info. Fortunate me I discovered your website unintentionally, and I’m stunned why this twist of fate did not came about in advance!
I bookmarked it.