Harvey,
Ok, I got your files and its already working here.
The problem is that you are mixing two different kinds of FiveWin browses: TCBrowse and TXBrowse, and you should only use one: TXBrowse.
In your resources, please change in dialogbox CODATA: "TCBrowse" into "TXBrowse".
In your PRG use #include "xbrowse.ch" instead of #include "tcbrowse.ch"
Here you have a working sample built from some portions of your code. Please review how I build it and modify your code accordingly, thanks:
test.prg
- Code: Select all Expand view RUN
#include "FiveWin.ch"
#include "xbrowse.ch"
function Main()
local oDlg, oDbf, oBrw
// SET RESOURCES TO "global.dll". I am using Test.rc for this test
USE Codata ALIAS cont1
DATABASE oDbf
DEFINE DIALOG oDlg RESOURCE "Codata"
REDEFINE XBROWSE oBrw ID 101 of oDlg
ADD COLUMN TO oBrw;
DATA {|| if( oDbf:industry == repli('-', 30), repli(' ', 30), ;
if( oDbf:industry == repli('=', 30), repli('_', 30), oDbf:industry)) };
SIZE 125 LEFT HEADER "Industry" COLOR CLR_BLACK, CLR_WHITE
ADD COLUMN TO oBrw;
DATA {|| if( oDbf:industry == repli('-', 30), repli(' ', 30), ;
if( oDbf:industry == repli('=', 30), repli('_', 30), oDbf:state)) };
SIZE 80 LEFT HEADER "State" COLOR CLR_BLACK, CLR_WHITE
oBrw:SetoDbf( oDbf )
ACTIVATE DIALOG oDlg CENTERED
return nil
Test.rc:
- Code: Select all Expand view RUN
CODATA DIALOG -4, 15, 624, 333
STYLE 0x4L | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Financial Summary"
FONT 8, "MS Sans Serif"
{
CONTROL "", 101, "TXBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_TABSTOP, 12, 8, 600, 292
PUSHBUTTON "&Done", 4002, 554, 308, 54, 18, BS_CENTER | BS_VCENTER | WS_TABSTOP
PUSHBUTTON "Sort ", 102, 470, 308, 54, 18, BS_CENTER | BS_VCENTER | WS_TABSTOP
}