how to make listbox smaller

how to make listbox smaller

Postby acwoo » Thu Nov 13, 2008 1:34 pm

#include "Fivewin.ch"


FUNCTION MAIN()

LOCAL oDlg, oBrw

LOCAL hBmp1 := READBITMAP( 0, "SELECT.BMP" )
LOCAL hBmp2 := READBITMAP( 0, "UNSELECT.BMP" )

USE TEST

DEFINE DIALOG oDlg SIZE 400, 300

@ 0, 0 LISTBOX oBrw FIELDS FIELD -> last,;
FIELD -> first,;
IF( FIELD -> married, hBmp1, hBmp2 ),;
"";
HEADERS "LAST", "FIRST", "M", "";
SIZES 100, 100, 16, 0

oBrw:bLClicked = { | nRow, nCol | Cambia( oBrw, nCol ) }

ACTIVATE DIALOG oDlg;
ON INIT oDlg:SetControl( oBrw );
CENTER

CLOSE

DELETEOBJECT( hBmp1 )
DELETEOBJECT( hBmp2 )

RETURN NIL


STATIC FUNCTION CAMBIA( oBrw, nCol )

IF oBrw:nAtCol( nCol ) = 3
REPLACE FIELD -> married WITH !FIELD -> married
oBrw:Refresh( .F. )
ENDIF

RETURN NIL

After putting in oDlg:SetControl( oBrw ) the Brw occupies the whole dialog
box, leaving no place to put in a button for "Exit".
Without oDlg:SetControl( oBrw ), I can put in the "Exit" button.
How do I solve this problem.

Thanks
acwoo
acwoo
 
Posts: 45
Joined: Fri Sep 28, 2007 8:53 am
Location: Makaysia

Postby Otto » Thu Nov 13, 2008 2:51 pm

Hello accwo,
try without ON INIT oDlg:SetControl( oBrw )

Regards,
Otto
User avatar
Otto
 
Posts: 6033
Joined: Fri Oct 07, 2005 7:07 pm

Postby James Bott » Thu Nov 13, 2008 3:48 pm

You can use a resource editor and design the dialog however you wish.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

how to make listbox smaller

Postby acwoo » Fri Nov 14, 2008 1:20 pm

>try without ON INIT oDlg:SetControl( oBrw )

It works.

Thanks
acwoo
acwoo
 
Posts: 45
Joined: Fri Sep 28, 2007 8:53 am
Location: Makaysia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 11 guests