HDR*PowerBuilder0500[]9FRE*NOD* ENT*0500=^]9 dwbutton.aplENT*0500_^]9 dwbutton.sraENT*0500Q^]9 dwbutton.praENT*0500K]]9d_dwbutton.srdENT*0500$b K]]9d_dwbutton.dwoENT*05000c9w_dwbutton.winENT*0500DNc9w_dwbutton.srwDAT*O^]9^]9 k@k@l@l@28m@m@KQn@n@QWp@p@W_b@b@b@kj@ kvdwbuttontransactionsqlcadynamicdescriptionareasqldadynamicstagingareasqlsaerrormessageapplicationw_dwbutton2)sqlcasqldasqlsaerrormessagedwbuttonx      DAT* #+create+destroycommandline+open  xm_initsrctransactiondynamicdescriptionareadynamicstagingareaerrormessageapplicationdwbuttonw_dwbuttonxP e to@evenon@bjec,Ro@ = 0?ut@_t.BE' @Pos(M tP@er()Y_t> 0 b p(@ f80jDAT*$j8jXjtj(6DRd0appnamedwbuttonmessagetransaction,dynamicdescriptionarea@dynamicstagingarea`error| $8Xt$ d"~@~8dcommandlinew_dwbutton(b@ DAT*[ @2 +create+destroy+open<2       DAT*forward global transaction sqlca global dynamicdescriptionarea sqlda global dynamicstagingarea sqlsa global error error global message message end forward global type dwbutton from application end type global dwbutton dwbutton on dwbutton.create appname = "dwbutton" message = create message sqlca = create transaction sqlda = create dynamicdescriptionarea sqlsa = create dynamicstagingarea error = create error end on on dwbutton.destroy destroy( sqlca ) destroy( sqlda ) dDAT*iestroy( sqlsa ) destroy( error ) destroy( message ) end on event open;Open(w_dwbutton) end event DAT*QcI_3O0MP$cM03Oc`c,CM]cXQ\Q,CMmc]c8N,CQmc8NXX"Arial"Arial"Arial"ArialDAT* release 5; datawindow(units=0 timer_interval=0 color=79741120 processing=0 print.documentname="" print.orientation = 0 print.margin.left = 110 print.margin.right = 110 print.margin.top = 97 print.margin.bottom = 97 print.paper.source = 0 print.paper.size = 0 print.prompt=no ) header(height=77 color="536870912" ) summary(height=1 color="536870912" ) footer(height=1 color="536870912" ) detail(height=97 color="536870912" ) table(column=(type=number updatewhereclause=yes name=flag dbname="flag" DAT*") ) text(band=header alignment="2" text="Flag"border="0" color="0" x="5" y="4" height="65" width="220" name=flag_t font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" ) text(band=detail alignment="0" text="Click Me!"border="6" color="0" x="257" y="8" height="77" width="302" name=button1_t font.face="Arial" font.height="-12" font.weight="400" font.family="2" font.pitch="2" font.charset="0" bDAT*ackground.mode="2" background.color="79741120" ) column(band=detail id=1 alignment="1" tabsequence=32766 border="0" color="0" x="5" y="8" height="77" width="220" format="[general]" name=flag edit.limit=0 edit.case=any edit.autoselect=yes edit.autohscroll=yes font.face="Arial" font.height="-10" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="536870912" ) DAT*&PDW0505ATpdwpM= !<````9AAnnaaDAT*( P@MP DAT**flag_t< $0%  ArialArial$ 2$-10$400$1$ 536870912$5$4$A65$DAT*,220%FlagFlag@@a"6P6#!$ ')+-/13 button1_t< % $&-12$( 79741120$*6DAT*.$,257$.8$0M77$2.302%45 Click Me! Click Me!t"7!-/8(;flag&9: [general] [general]@|DAT* @6>?flagflag6DAT*2Oc9c9 j@j@j@@@V@V@"U@U@.]@]@;P@P@th@h@@@~@~@k@k@ p@p@vN @X@X@ w_dwbuttonwindowmenuwindowtypewindowstatewindowobjecttoolbaralignment OdatawindowborderstyledwobjectCommand Buttons In A DataWindow 6Od_dwbuttontransactionsqlcamessagepowerobjectLDAT*42 w_dwbutton @xposyposrowdwo+ue_lbuttonup+open+create+destroy+clicked`    0 x_initsrcwindoww_dwbuttonmenuwindowtypewindowstatewindowobjecttoolbaralignmentdatawindowdw_1borderstyledwobjecttransactionmessagepowerobject, @@DAT*6 @+@7@D@U@`e@q @z @ @@ #aB'&}~\"$, ) 81}@1<z($1)<86,1,DDAT*8$ Tvzdli_isqlca::message< j@ @  @ L(dw_1h@& settransobject@>& insertrow0  ( < D @* ($ |d0 dw_1j@& control]@&   ( $ddw_1DAT*:&  ##2 +open+create+destroy<globdwon f X=13102 Sxywidthheighttitlebartitlebackcolorcontrolmenuminboxmaxboxresizabledw_1nN U *6=DN ] nDAT*<NU  1  @@@ #&.$8 0)81)898@$8J9nd8DAT*>g8l8H)8)88J@9811@8,1 ,$Hdxposyposrowdwo::messagedX@ X@ @ @object~@getrowflagset_attribute_item%~@6button1_tget_attributej@Tborderset_attributesgetobjectatpoinDAT*@terT  8 @ d    89n880z0$8801)P988X)88806s@s8,1,$,h d!xposyposrowdwols_x::messagex  DAT*B @ (nameget_attributebutton1_tobject&~@flagset_attribute_item=button1_t.Border='0 If(flag=1, 5, 6)'modifyZ~Error 0 P    } }2 +ue_lbuttonup+clicked(2 0xywidthheighttaborderdataobjectlivescroll DAT*C%N]  @ @ N@ }70DAT*Fforward global type w_dwbutton from Window end type type dw_1 from datawindow within w_dwbutton end type end forward global type w_dwbutton from Window int X=1390 int Y=1045 int Width=1358 int Height=853 boolean TitleBar=true string Title="Command Buttons In A DataWindow" long BackColor=79741120 boolean ControlMenu=true boolean MinBox=true boolean MaxBox=true boolean Resizable=true dw_1 dw_1 end type global w_dwbutton w_dwbutton event open;int li_i dw_1.SetTransObject(SDAT*HQLCA) FOR li_i = 1 TO 5 dw_1.InsertRow(0) NEXT end event on w_dwbutton.create this.dw_1=create dw_1 this.Control[]={ this.dw_1} end on on w_dwbutton.destroy destroy(this.dw_1) end on type dw_1 from datawindow within w_dwbutton event ue_lbuttonup pbm_dwnlbuttonup int X=174 int Y=129 int Width=942 int Height=421 int TabOrder=1 string DataObject="d_dwbutton" boolean LiveScroll=true end type event ue_lbuttonup;Object.flag[GetRow()] = 0 Object.button1_t.Border = '6' IDAT*bF Pos(GetObjectAtPointer(), 'button1_t' ) > 0 THEN Beep(1) // Place whatever code you might want to do here. END IF end event event clicked;string ls_x IF dwo.Name = 'button1_t' THEN Object.flag[row] = 1 ls_x = Modify("button1_t.Border='0~tIf(flag=1, 5, 6)'") IF Trim(ls_x) <> '' THEN MessageBox('Error', ls_x) END IF end event