Control Object Component List In PowerBuilder
Example Window
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 |
forward global type w_main from window end type type cbx_visible from checkbox within w_main end type type sle_control from singlelineedit within w_main end type type cbx_enabled from checkbox within w_main end type type rb_1 from radiobutton within w_main end type type cbx_1 from checkbox within w_main end type type lb_1 from listbox within w_main end type type sle_1 from singlelineedit within w_main end type type pb_1 from picturebutton within w_main end type type st_1 from statictext within w_main end type type cb_control from commandbutton within w_main end type type dw_objects from datawindow within w_main end type type gb_1 from groupbox within w_main end type end forward global type w_main from window integer width = 2752 integer height = 1676 boolean titlebar = true string title = "Control Object Component List" boolean controlmenu = true boolean minbox = true boolean maxbox = true boolean resizable = true long backcolor = 67108864 string icon = "AppIcon!" boolean center = true cbx_visible cbx_visible sle_control sle_control cbx_enabled cbx_enabled rb_1 rb_1 cbx_1 cbx_1 lb_1 lb_1 sle_1 sle_1 pb_1 pb_1 st_1 st_1 cb_control cb_control dw_objects dw_objects gb_1 gb_1 end type global w_main w_main on w_main.create this.cbx_visible=create cbx_visible this.sle_control=create sle_control this.cbx_enabled=create cbx_enabled this.rb_1=create rb_1 this.cbx_1=create cbx_1 this.lb_1=create lb_1 this.sle_1=create sle_1 this.pb_1=create pb_1 this.st_1=create st_1 this.cb_control=create cb_control this.dw_objects=create dw_objects this.gb_1=create gb_1 this.Control[]={this.cbx_visible,& this.sle_control,& this.cbx_enabled,& this.rb_1,& this.cbx_1,& this.lb_1,& this.sle_1,& this.pb_1,& this.st_1,& this.cb_control,& this.dw_objects,& this.gb_1} end on on w_main.destroy destroy(this.cbx_visible) destroy(this.sle_control) destroy(this.cbx_enabled) destroy(this.rb_1) destroy(this.cbx_1) destroy(this.lb_1) destroy(this.sle_1) destroy(this.pb_1) destroy(this.st_1) destroy(this.cb_control) destroy(this.dw_objects) destroy(this.gb_1) end on type cbx_visible from checkbox within w_main integer x = 2304 integer y = 320 integer width = 293 integer height = 80 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 = "Visible" boolean checked = true end type event clicked; Int i Int j String ls_class CommandButton lcb_button DataWindow ld_dw StaticText lst_text Tab ltab_tab GroupBox lgb_name CheckBox lcbx_name RadioButton lrb_name DropDownListBox lddlb_dropdownlistbox SingleLineEdit lsle_sle MultiLineEdit lmle_mle picturebutton lpb_name ls_class = sle_control.Text If IsNull(ls_class) Or Len(Trim(ls_class)) = 0 Then Return j = UpperBound(Parent.Control) For i = 1 To j If Parent.Control[i].ClassName() = ls_class Then Choose Case Parent.Control[i].TypeOf() Case Animation! Case Line! Case RadioButton! lrb_name = Parent.Control[i] lrb_name.Visible = This.Checked Case CheckBox! lcbx_name = Parent.Control[i] lcbx_name.Visible = This.Checked Case ListBox! Case Rectangle! Case CommandButton! lcb_button = Parent.Control[i] lcb_button.Visible = This.Checked Case ListView! Case RichTextEdit! Case DataWindow! ld_dw = Parent.Control[i] ld_dw.Visible = This.Checked Case MonthCalendar! Case RoundRectangle! Case DropDownListBox! Case MultiLineEdit! lmle_mle = Parent.Control[i] lmle_mle.Visible = This.Checked Case SingleLineEdit! lsle_sle = Parent.Control[i] lsle_sle.Visible = This.Checked Case DropDownPictureListBox! Case OLEControl! Case StaticHyperLink! Case EditMask! Case OLECustomControl! Case StaticText! lst_text = Parent.Control[i] lst_text.Visible = This.Checked Case Graph! Case Oval! Case Tab! Case GroupBox! lgb_name = Parent.Control[i] lgb_name.Visible = This.Checked Case Picture! Case TreeView! Case HProgressBar! Case picturebutton! lpb_name = Parent.Control[i] lpb_name.Visible = This.Checked Case VProgressBar! Case HScrollBar! Case PictureHyperLink! Case VScrollBar! Case HTrackBar! Case PictureListBox! Case VTrackBar! Case Else End Choose Exit End If Next end event type sle_control from singlelineedit within w_main integer x = 1975 integer y = 224 integer width = 585 integer height = 92 integer taborder = 40 integer textsize = -10 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" long textcolor = 33554432 string text = "pb_1" textcase textcase = lower! borderstyle borderstyle = stylelowered! end type type cbx_enabled from checkbox within w_main integer x = 1975 integer y = 320 integer width = 293 integer height = 80 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 = "Enabled" boolean checked = true end type event clicked; Int i Int j String ls_class CommandButton lcb_button DataWindow ld_dw StaticText lst_text Tab ltab_tab GroupBox lgb_name CheckBox lcbx_name RadioButton lrb_name DropDownListBox lddlb_dropdownlistbox SingleLineEdit lsle_sle MultiLineEdit lmle_mle picturebutton lpb_name ls_class = sle_control.Text If IsNull(ls_class) Or Len(Trim(ls_class)) = 0 Then Return j = UpperBound(Parent.Control) For i = 1 To j If Parent.Control[i].ClassName() = ls_class Then Choose Case Parent.Control[i].TypeOf() Case Animation! Case Line! Case RadioButton! lrb_name = Parent.Control[i] lrb_name.Enabled = This.Checked Case CheckBox! lcbx_name = Parent.Control[i] lcbx_name.Enabled = This.Checked Case ListBox! Case Rectangle! Case CommandButton! lcb_button = Parent.Control[i] lcb_button.Enabled = This.Checked Case ListView! Case RichTextEdit! Case DataWindow! ld_dw = Parent.Control[i] ld_dw.Enabled = This.Checked Case MonthCalendar! Case RoundRectangle! Case DropDownListBox! Case MultiLineEdit! lmle_mle = Parent.Control[i] lmle_mle.Enabled = This.Checked Case SingleLineEdit! lsle_sle = Parent.Control[i] lsle_sle.Enabled = This.Checked Case DropDownPictureListBox! Case OLEControl! Case StaticHyperLink! Case EditMask! Case OLECustomControl! Case StaticText! lst_text = Parent.Control[i] lst_text.Enabled = This.Checked Case Graph! Case Oval! Case Tab! Case GroupBox! lgb_name = Parent.Control[i] lgb_name.Enabled = This.Checked Case Picture! Case TreeView! Case HProgressBar! Case picturebutton! lpb_name = Parent.Control[i] lpb_name.Enabled = This.Checked Case VProgressBar! Case HScrollBar! Case PictureHyperLink! Case VScrollBar! Case HTrackBar! Case PictureListBox! Case VTrackBar! Case Else End Choose Exit End If Next end event type rb_1 from radiobutton within w_main integer x = 1134 integer y = 96 integer width = 293 integer height = 80 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 = "none" end type type cbx_1 from checkbox within w_main integer x = 1134 integer y = 192 integer width = 329 integer height = 80 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 = "check" end type type lb_1 from listbox within w_main integer x = 549 integer y = 192 integer width = 475 integer height = 224 integer taborder = 30 integer textsize = -10 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" long textcolor = 33554432 borderstyle borderstyle = stylelowered! end type type sle_1 from singlelineedit within w_main integer x = 439 integer y = 32 integer width = 512 integer height = 96 integer taborder = 20 integer textsize = -10 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" long textcolor = 33554432 string text = "singleline test" borderstyle borderstyle = stylelowered! end type type pb_1 from picturebutton within w_main integer x = 110 integer y = 192 integer width = 402 integer height = 224 integer taborder = 20 integer textsize = -10 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" string text = "aaaaaaa" boolean originalsize = true alignment htextalign = left! end type type st_1 from statictext within w_main integer x = 146 integer y = 64 integer width = 402 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 = "static text" boolean focusrectangle = false end type type cb_control from commandbutton within w_main integer x = 2231 integer y = 32 integer width = 329 integer height = 112 integer taborder = 10 integer textsize = -10 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" string text = "Control" end type event clicked;Int i Int li_cnt, li_row String ls_type, ls_classname, ls_obj_name, ls_Text CommandButton lcb_button DataWindow ld_dw StaticText lst_text Tab ltab_tab GroupBox lgb_name CheckBox lcbx_name RadioButton lrb_name DropDownListBox lddlb_dropdownlistbox SingleLineEdit lsle_sle MultiLineEdit lmle_mle picturebutton lpb_name li_cnt = UpperBound(Parent.Control) For i = 1 To li_cnt ls_Text = "" ls_type = "" Choose Case Parent.Control[i].TypeOf() Case Animation! ls_type = "Animation" Case Line! ls_type = "Line" Case RadioButton! ls_type = "RadioButton" lrb_name = Parent.Control[i] ls_Text = lrb_name.text Case CheckBox! ls_type = "CheckBox" lcbx_name = Parent.Control[i] ls_Text = lcbx_name.text Case ListBox! ls_type = "ListBox" Case Rectangle! ls_type = "Rectangle" Case Commandbutton! ls_type = "CommandButton" lcb_button = Parent.Control[i] ls_Text = lcb_button.text Case ListView! ls_type = "ListView" Case RichTextEdit! ls_type = "RichTextEdit" Case DataWindow! ls_type = "DataWindow" ld_dw = Parent.Control[i] ls_Text = ld_dw.title Case MonthCalendar! ls_type = "MonthCalendar" Case RoundRectangle! ls_type = "RoundRectangle" Case DropDownListBox! ls_type = "DropDownListBox" Case MultiLineEdit! ls_type = "MultiLineEdit" lmle_mle = Parent.Control[i] ls_Text = lmle_mle.text Case SingleLineEdit! ls_type = "SingleLineEdit" lsle_sle = Parent.Control[i] ls_Text = lsle_sle.text Case DropDownPictureListBox! ls_type = "DropDownPictureListBox" Case OLEControl! ls_type = "OLEControl" Case StaticHyperLink! ls_type = "StaticHyperLink" Case EditMask! ls_type = "EditMask" Case OLECustomControl! ls_type = "OLECustomControl" Case StaticText! ls_type = "StaticText" lst_text = Parent.Control[i] ls_Text = lst_text.text Case Graph! ls_type = "Graph" Case Oval! ls_type = "Oval" Case Tab! ls_type = "Tab" Case GroupBox! ls_type = "GroupBox" lgb_name = Parent.Control[i] ls_Text = lgb_name.text Case Picture! ls_type = "Picture" Case TreeView! ls_type = "TreeView" Case HProgressBar! ls_type = "HProgressBar" Case PictureButton! ls_type = "PictureButton" lpb_name = Parent.Control[i] ls_Text = lpb_name.text Case VProgressBar! ls_type = "VProgressBar" Case HScrollBar! ls_type = "HScrollBar" Case PictureHyperLink! ls_type = "PictureHyperLink" Case VScrollBar! ls_type = "VScrollBar" Case HTrackBar! ls_type = "HTrackBar" Case PictureListBox! ls_type = "PictureListBox" Case VTrackBar! ls_type = "VTrackBar" Case Else ls_type = "Unkown" End Choose li_row = dw_objects.InsertRow(0) dw_objects.SetItem(li_row, "as_class", Parent.Control[i].ClassName() ) dw_objects.SetItem(li_row, "as_type",ls_type ) dw_objects.SetItem(li_row, "as_text",ls_Text ) Next end event type dw_objects from datawindow within w_main integer x = 37 integer y = 480 integer width = 2633 integer height = 992 integer taborder = 10 string title = "none" string dataobject = "d_objects" boolean hscrollbar = true boolean vscrollbar = true boolean livescroll = true borderstyle borderstyle = stylelowered! end type type gb_1 from groupbox within w_main integer x = 1061 integer width = 480 integer height = 400 integer taborder = 40 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 = "test group" end type |
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 |
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 ) header(height=84 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=as_class dbname="as_class" ) column=(type=char(100) updatewhereclause=yes name=as_type dbname="as_type" ) column=(type=char(200) updatewhereclause=yes name=as_text dbname="as_text" ) ) text(band=header alignment="2" text="Class" border="6" color="33554432" x="114" y="4" height="68" width="946" html.valueishtml="0" name=as_class_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="Type" border="6" color="33554432" x="1074" y="4" height="68" width="530" html.valueishtml="0" name=as_type_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="68" 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" ) text(band=header alignment="2" text="Text" border="6" color="33554432" x="1614" y="4" height="68" width="782" html.valueishtml="0" name=as_text_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=detail alignment="2" expression="GetRow()"border="6" color="33554432" x="5" y="4" height="68" 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="68" width="946" format="[general]" html.valueishtml="0" name=as_class visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes 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=2 alignment="0" tabsequence=20 border="0" color="33554432" x="1074" y="4" height="68" width="530" format="[general]" html.valueishtml="0" name=as_type visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes 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=3 alignment="0" tabsequence=30 border="0" color="33554432" x="1618" y="4" height="68" width="777" format="[general]" html.valueishtml="0" name=as_text visible="1" edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=no font.face="Tahoma" font.height="-9" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="67108864" ) 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!
Subscribe
Login
0 Comments