Re: Problem Clicking on Fields in Dialog
Posted: Thu Nov 07, 2013 1:43 pm
by cdmmaui
Antonio,
Here is the PRG and part of RC, the WR1 listed below is only dialog that has this behavior.
Please note everything was working fine until I updated with Pelles C IDE.
// PRG........
DEFINE ICON oIcon RESOURCE "WMS"
DEFINE DIALOG oDlg RESOURCE "DATAENTRY" TITLE cTitle ICON oIcon
REDEFINE FOLDER oFld ID 5000 OF oDlg ;
PROMPT "Receipt" ;
DIALOGS cFolder
// Page 1...
REDEFINE GET aWr[01] VAR Mbookno ID 101 OF oFld:aDialogs[1] ;
PICTURE "@!S20" ;
VALID ( lPass := WrChk( "BOOK", lAppend, @Mbookno, @Mbookno2, @Mownid, @Mownchk, @Mownname, @Mpcs, @Mtotlbs, @Mtotkgs, Mserial, oDimBox, @Mconsid, @Mconschk, @Mconsname ), _GetRef( aWr ), lPass ) ;
WHEN lAppend .AND. (! "TOPLAX" $ Pmod)
REDEFINE GET aWr[02] VAR Mwrno ID 102 OF oFld:aDialogs[1] ;
PICTURE REPLIC("!",20) ;
WHEN lWrno
REDEFINE GET aWr[03] VAR Mdate ID 103 OF oFld:aDialogs[1] ;
PICTURE "@D" VALID( lPass := _sysdate( Mdate, PA[29], .F. ), lPass ) WHEN lAppend .OR. ( "TTUSA" $ Pmod )
REDEFINE GET aWr[04] VAR Mtime ID 104 OF oFld:aDialogs[1] ;
PICTURE "@!S8" ;
WHEN .F.
REDEFINE GET aWr[05] VAR Mrecvby ID 105 OF oFld:aDialogs[1] ;
PICTURE "@!S20" ;
WHEN (! "TOPLAX" $ Pmod)
REDEFINE GET aWr[06] VAR Msuppid ID 106 OF oFld:aDialogs[1] ;
PICTURE REPLIC("!",10) ;
UPDATE ;
VALID ( lPass := ContLook( @Msuppid, @Msuppchk, @Msupp ) , ;
WrChk( 'OWNER', Msuppid, @Mownid ) , ;
_GetRef( aWr ), lPass )
REDEFINE GET aWr[07] VAR Msupp ID 121 OF oFld:aDialogs[1] ;
PICTURE REPLIC("!",35) WHEN .F.
REDEFINE GET aWr[08] VAR Msuppref ID 110 OF oFld:aDialogs[1] ;
PICTURE REPLIC("!",30)
REDEFINE GET aWr[09] VAR Mshipfid ID 126 OF oFld:aDialogs[1] ;
PICTURE REPLIC("!",10) ;
UPDATE ;
VALID ( lPass := ContLook( @Mshipfid, @Mshipfchk, @Mshipfname ) , ;
_GetRef( aWr ), lPass )
REDEFINE GET aWr[10] VAR Mshipfname ID 127 OF oFld:aDialogs[1] ;
PICTURE REPLIC("!",35) WHEN .F.
REDEFINE GET aWr[11] VAR Mconsid ID 133 OF oFld:aDialogs[1] ;
PICTURE REPLIC("!",10) ;
UPDATE ;
VALID ( lPass := ContLook( @Mconsid, @Mconschk, @Mconsname ) , ;
_GetRef( aWr ), lPass )
REDEFINE GET aWr[12] VAR Mconsname ID 134 OF oFld:aDialogs[1] ;
PICTURE REPLIC("!",35) WHEN .F.
REDEFINE GET aWr[13] VAR Mownid ID 107 OF oFld:aDialogs[1] ;
PICTURE REPLIC("!",10) ;
UPDATE ;
VALID ( lPass := ContLook( @Mownid, @Mownchk, @Mownname ) , ;
_GetRef( aWr ), lPass )
REDEFINE GET aWr[14] VAR Mownname ID 108 OF oFld:aDialogs[1] ;
PICTURE REPLIC("!",35) WHEN .F.
REDEFINE GET aWr[15] VAR Mpo ID 116 OF oFld:aDialogs[1] ;
PICTURE REPLIC("!",30) ;
VALID ( lPass := PoLook( @Mpo, @Mownid, @Msuppid, .T. ) , ;
WrPoUpd( Mpo, Mownid, Msuppid, lAppend, Mserial, oDimBox ) , ;
_GetRef( aWr ), lPass )
REDEFINE GET aWr[16] VAR Mprojectid ID 135 OF oFld:aDialogs[1] PICTURE "@!"
REDEFINE COMBOBOX aWr[17] VAR Mreqloc ID 130 ITEMS aReqLoc OF oFld:aDialogs[1]
REDEFINE CHECKBOX Mbillable ID 114 OF oFld:aDialogs[1] WHEN aSecurity[05]
REDEFINE GET aWr[18] VAR Mctnr ID 115 OF oFld:aDialogs[1] ;
PICTURE REPLIC("!",15)
REDEFINE COMBOBOX aWr[19] VAR Mtype ID 122 ITEMS aCtnr ;
OF oFld:aDialogs[1]
REDEFINE COMBOBOX aWr[20] VAR Mloadtype ID 123 ITEMS aLoad OF oFld:aDialogs[1] ;
VALID ( oDlg:Refresh(), .T. )
REDEFINE GET aWr[21] VAR Mpallet ID 111 OF oFld:aDialogs[1] PICTURE '9999'
REDEFINE GET aWr[22] VAR Mctns ID 113 OF oFld:aDialogs[1] PICTURE '999999'
REDEFINE GET aWr[23] VAR Mpcs ID 136 OF oFld:aDialogs[1] PICTURE '999999'
REDEFINE GET aWr[24] VAR Mtotlbs ID 128 OF oFld:aDialogs[1] PICTURE '999999.99' ;
VALID ( lPass := _Calc( "LBS", @Mtotlbs, @Mtotlbs2, @Mtotkgs, @Mtotkgs2 ) , ;
_GetRef( aWr ), lPass )
REDEFINE GET aWr[25] VAR Mtotkgs ID 129 OF oFld:aDialogs[1] PICTURE '999999.99' ;
VALID ( lPass := _Calc( "KGS", @Mtotkgs, @Mtotkgs2, @Mtotlbs, @Mtotlbs2 ) , ;
_GetRef( aWr ), lPass )
REDEFINE GET aWr[26] VAR Mtotcft ID 131 OF oFld:aDialogs[1] PICTURE '999999.999' ;
VALID ( lPass := _Calc( "CFT", @Mtotcft, @Mtotcft2, @Mtotcbm, @Mtotcbm2 ) , ;
_GetRef( aWr ), lPass )
REDEFINE GET aWr[27] VAR Mtotcbm ID 132 OF oFld:aDialogs[1] PICTURE '999999.999' ;
VALID ( lPass := _Calc( "CBM", @Mtotcbm, @Mtotcbm2, @Mtotcft, @Mtotcft2 ) , ;
_GetRef( aWr ), lPass )
REDEFINE CHECKBOX aWr[28] VAR Mdevan ID 109 OF oFld:aDialogs[1]
REDEFINE GET aWr[29] VAR Mcarrier ID 124 OF oFld:aDialogs[1] ;
PICTURE REPLIC("!",10) ;
UPDATE ;
VALID ( lPass := ContLook( @Mcarrier, @Mcarrchk, @Mcarrname ) , ;
_GetRef( aWr ), lPass )
REDEFINE GET aWr[30] VAR Mcarrname ID 117 OF oFld:aDialogs[1] ;
PICTURE REPLIC("!",35) WHEN .F.
REDEFINE GET aWr[31] VAR Mcarrref ID 118 OF oFld:aDialogs[1]
REDEFINE GET Mtrackno ID 125 OF oFld:aDialogs[1]
REDEFINE CHECKBOX aWr[32] VAR Mhaz ID 112 OF oFld:aDialogs[1]
REDEFINE GET aWr[33] VAR Mexcept ID 119 OF oFld:aDialogs[1] WHEN .F.
REDEFINE GET aWr[34] VAR Mnotes MEMO ID 120 OF oFld:aDialogs[1]
REDEFINE RADIO aWr[35] VAR Mum ID 232,233 OF oFld:aDialogs[1]
REDEFINE BUTTON ID 1 OF oDlg ACTION ( lSave := .t. , oDlg:End() )
REDEFINE BUTTON ID 2 OF oDlg ACTION ( lSave := .f. , oDlg:End() )
// Details...
SELECT wmsdet
GO TOP
SEEK Mserial
DO CASE
CASE 'LINKSYS' $ Pmod
REDEFINE LISTBOX oDimBox FIELDS wmsdet->desc , ;
TRANSF(wmsdet->qty,"9999999") , ;
wmsdet->pkg , ;
LTRIM( STR( wmsdet->len, 9, 1 ) ) + ' x ' + LTRIM( STR( wmsdet->wid, 9, 1 ) ) + ' x ' + LTRIM( STR( wmsdet->hgt, 9, 1 ) ) , ;
TRANSF(wmsdet->lbs,"9,999,999.99") , ;
TRANSF(wmsdet->kgs,"9,999,999.99") , ;
wmsdet->receiptid ;
ID 6000 ;
HEADERS "Description", "Qty", "Pkg", "Dimensions", "Lbs", "Kgs", "ReceiptID" ;
FIELDSIZES 200 , 55 , 75 , 125 , 85 , 85 , 125 ;
SELECT serial FOR Mserial ;
ON DBLCLICK WrDet( oDimBox, .F., Mserial, Mownid, @Mexcept, Mownname ) ;
OF oFld:aDialogs[1] ;
UPDATE
OTHERWISE
REDEFINE LISTBOX oDimBox FIELDS STR( wmsdet->item, 6 ) , ;
wmsdet->sku , ;
wmsdet->lotno , ;
wmsdet->desc , ;
TRANSF(wmsdet->qty,"9999999") , ;
wmsdet->pkg , ;
wmsdet->except , ;
wmsdet->serialp , ;
wmsdet->reqloc , ;
wmsdet->receiptid ;
ID 6000 ;
HEADERS "Item No", "SKU", "Lot", "Description", "Quantity", "Pkg", "Exceptions", "Putaway Id", "", "ReceiptID" ;
FIELDSIZES 45 , 175 , 100 , 175 , 100 , 55 , 150 , 100 , 99, 100 ;
SELECT serial FOR Mserial ;
ON DBLCLICK WrDet( oDimBox, .F., Mserial, Mownid, @Mexcept, Mownname ) ;
OF oFld:aDialogs[1] ;
UPDATE
ENDCASE
// Pressing Enter...
oDimBox:bKeyDown := { | nKey | IF( nKey = 13, WrDet( oDimBox, .F., Mserial, Mownid, @Mexcept, Mownname ), oDimBox:Refresh() ) }
/* Buttons */
REDEFINE BUTTON ID 6001 OF oFld:aDialogs[1] ACTION WrDet( oDimBox, .T., Mserial, Mownid, @Mexcept, Mownname ) WHEN ! EMPTY( Mownid )
REDEFINE BUTTON ID 6002 OF oFld:aDialogs[1] ACTION WrDet( oDimBox, .F., Mserial, Mownid, @Mexcept, Mownname ) WHEN ! EMPTY( Mownid )
REDEFINE BUTTON ID 6003 OF oFld:aDialogs[1] ACTION WrDDi( oDimBox, Mserial, @Mexcept ) WHEN ! EMPTY( Mownid )
ACTIVATE DIALOG oDlg CENTERED VALID WrDup( @lSave, lAppend, @Mwrno, @Mbookno, Mserial, @Mpcs, @Mctns )
// RC........
// RESOURCE SCRIPT generated by "Pelles C for Windows, version 3.00".
#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
LANGUAGE LANG_ENGLISH,SUBLANG_ENGLISH_US
WR1 DIALOG DISCARDABLE 68, 4, 595, 400
STYLE WS_CHILD|DS_3DLOOK|WS_CAPTION|WS_VISIBLE
FONT 8, "tahoma"
BEGIN
CONTROL "Booking No.", -1, "Static", WS_GROUP, 5, 7, 42, 8
CONTROL "", 101, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 55, 5, 90, 12
CONTROL "Receipt No.", -1, "Static", WS_GROUP, 5, 22, 40, 8
CONTROL "", 102, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 55, 20, 90, 12
CONTROL "Date", -1, "Static", WS_GROUP, 5, 37, 40, 8
CONTROL "", 103, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 55, 35, 45, 12
CONTROL "Time", -1, "Static", WS_GROUP, 5, 52, 40, 8
CONTROL "", 104, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 55, 50, 30, 12
CONTROL "Recv By", -1, "Static", WS_GROUP, 5, 67, 40, 8
CONTROL "", 105, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 55, 65, 65, 12
CONTROL "Supplier ID", -1, "Static", WS_GROUP, 5, 82, 47, 8
CONTROL "", 106, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 55, 80, 55, 12
CONTROL "Supplier", -1, "Static", WS_GROUP, 5, 97, 37, 8
CONTROL "", 121, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 55, 95, 150, 12
CONTROL "Supplier Ref.", -1, "Static", WS_GROUP, 5, 112, 47, 8
CONTROL "", 110, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 55, 110, 110, 12
CONTROL "Shipper ID", -1, "Static", WS_GROUP, 5, 127, 47, 8
CONTROL "", 126, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 55, 125, 55, 12
CONTROL "Shipper", -1, "Static", WS_GROUP, 5, 143, 46, 8
CONTROL "", 127, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 55, 140, 150, 12
CONTROL "Consignee ID", -1, "Static", WS_GROUP, 5, 157, 47, 8
CONTROL "", 133, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 55, 155, 55, 12
CONTROL "Consignee", -1, "Static", WS_GROUP, 5, 173, 46, 8
CONTROL "", 134, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 55, 170, 150, 12
CONTROL "Owner", -1, "Static", WS_GROUP, 5, 187, 47, 8
CONTROL "", 107, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 55, 185, 55, 12
CONTROL "Owner Name", -1, "Static", WS_GROUP, 5, 203, 46, 8
CONTROL "", 108, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 55, 200, 150, 12
CONTROL "P.O. No.", -1, "Static", WS_GROUP, 5, 217, 31, 8
CONTROL "", 116, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 55, 215, 110, 12
CONTROL "Project ID", -1, "Static", WS_GROUP, 5, 242, 44, 8
CONTROL "", 135, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 55, 240, 110, 12
CONTROL "Warehouse", -1, "Static", WS_GROUP, 225, 7, 38, 8
CONTROL "", 130, "ComboBox", WS_BORDER|CBS_DROPDOWNLIST|WS_VSCROLL|WS_TABSTOP, 280, 5, 50, 67
CONTROL "Billable (Click for Yes)", 114, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 383, 5, 86, 12
CONTROL "Container No.", -1, "Static", WS_GROUP, 225, 22, 43, 8
CONTROL "", 115, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 280, 20, 75, 12
CONTROL "Type", -1, "Static", SS_RIGHT|WS_GROUP, 360, 22, 19, 8
CONTROL "", 122, "ComboBox", WS_BORDER|CBS_DROPDOWNLIST|WS_VSCROLL|WS_TABSTOP, 383, 20, 55, 91
CONTROL "Load Type", -1, "Static", WS_GROUP, 225, 37, 43, 8
CONTROL "", 123, "ComboBox", WS_BORDER|CBS_DROPDOWNLIST|WS_VSCROLL|WS_TABSTOP, 280, 35, 75, 91
CONTROL "Pallets", -1, "Static", WS_GROUP, 225, 52, 46, 8
CONTROL "", 111, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 280, 50, 30, 12
CONTROL "Cartons", -1, "Static", WS_GROUP, 226, 67, 26, 8
CONTROL "", 113, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 280, 65, 30, 12
CONTROL "Pieces", -1, "Static", WS_GROUP, 226, 82, 22, 8
CONTROL "", 136, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 280, 80, 30, 12
CONTROL "Total LBS", -1, "Static", WS_GROUP, 225, 97, 43, 8
CONTROL "", 128, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 280, 95, 50, 12
CONTROL "Total KGS", -1, "Static", SS_RIGHT|WS_GROUP, 332, 97, 47, 8
CONTROL "", 129, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 383, 95, 50, 12
CONTROL "Total CFT", -1, "Static", WS_GROUP, 225, 112, 43, 8
CONTROL "", 131, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 280, 110, 50, 12
CONTROL "Total CBM", -1, "Static", SS_RIGHT|WS_GROUP, 332, 112, 47, 8
CONTROL "", 132, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 383, 110, 50, 12
CONTROL "Devan", -1, "Static", WS_GROUP, 225, 126, 43, 8
CONTROL "Check for Yes", 109, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 280, 125, 60, 12
CONTROL "Trucker ID", -1, "Static", WS_GROUP, 225, 142, 47, 8
CONTROL "", 124, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 280, 140, 55, 12
CONTROL "Trucking Co.", -1, "Static", WS_GROUP, 225, 157, 46, 8
CONTROL "", 117, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 280, 155, 150, 12
CONTROL "Trucker Pro", -1, "Static", WS_GROUP, 225, 172, 40, 8
CONTROL "", 118, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 280, 170, 125, 12
CONTROL "Tracking No.", -1, "Static", WS_GROUP, 225, 187, 47, 8
CONTROL "", 125, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 280, 185, 125, 12
CONTROL "Hazardous", -1, "Static", WS_GROUP, 225, 201, 43, 8
CONTROL "Check for Yes", 112, "Button", BS_AUTOCHECKBOX|WS_TABSTOP, 280, 200, 60, 12
CONTROL "Exceptions", -1, "Static", WS_GROUP, 225, 217, 40, 8
CONTROL "", 119, "Edit", ES_AUTOHSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_BORDER|WS_TABSTOP, 280, 215, 110, 12
CONTROL "-- Notes --", -1, "Static", SS_CENTER|WS_GROUP, 381, 238, 60, 8
CONTROL "", 120, "Edit", ES_MULTILINE|ES_AUTOVSCROLL|ES_WANTRETURN|ES_UPPERCASE|WS_VSCROLL|WS_BORDER|WS_TABSTOP, 226, 249, 366, 40
CONTROL "Inches", 232, "Button", BS_RADIOBUTTON, 5, 280, 33, 12
CONTROL "Centimeters", 233, "Button", BS_RADIOBUTTON, 46, 280, 48, 12
CONTROL "", 6000, "TWBrowse", WS_DISABLED|WS_TABSTOP|0x00b00000, 5, 295, 545, 95
CONTROL "&Add", 6001, "Button", WS_TABSTOP, 555, 295, 38, 14
CONTROL "&Modify", 6002, "Button", WS_TABSTOP, 555, 315, 38, 14
CONTROL "&Delete", 6003, "Button", WS_TABSTOP, 555, 335, 38, 14
END