Toolbar

Toolbar

Postby fp » Mon Jan 30, 2006 10:53 am

I need a toolbar in a dialog. But it doesn't work (error-message: "cannot create window class TBAR").

Test4711() works
Test4712() doesn't work

why?

Code: Select all  Expand view
*******************
FUNCTION Test4711()
*******************
LOCAL oWnd, oBar
DEFINE WINDOW oWnd TITLE "Test"
DEFINE BUTTONBAR oBar OF oWnd
ACTIVATE WINDOW oWnd VALID .T.
RETURN NIL

*******************
FUNCTION Test4712()
*******************
LOCAL oDlg, oBar
DEFINE DIALOG oDlg TITLE "Test"
DEFINE BUTTONBAR oBar OF oDlg
ACTIVATE DIALOG oDlg VALID .T.
RETURN NIL
Frank-Peter
User avatar
fp
 
Posts: 76
Joined: Fri Dec 30, 2005 10:25 am
Location: Germany

Re: Toolbar

Postby Enrico Maria Giordano » Mon Jan 30, 2006 11:20 am

Try to activate the toolbar during the ON INIT event of the DIALOG.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Toolbar

Postby fp » Mon Jan 30, 2006 11:55 am

Hello EnricoMaria,

thanks, it works now:

Code: Select all  Expand view
*******************
FUNCTION Test4713()
*******************
LOCAL oWnd
DEFINE WINDOW oWnd TITLE "Test"
ACTIVATE WINDOW oWnd VALID .T. ON INIT OnInitUdf(oWnd)
RETURN NIL


*******************
FUNCTION Test4714()
*******************
LOCAL oDlg
DEFINE DIALOG oDlg TITLE "Test"
ACTIVATE DIALOG oDlg VALID .T. ON INIT OnInitUdf(oDlg)
RETURN NIL



****************************
STATIC FUNCTION OnInitUdf(o)
****************************
LOCAL oBar
DEFINE BUTTONBAR oBar OF o
RETURN .T.
Frank-Peter
User avatar
fp
 
Posts: 76
Joined: Fri Dec 30, 2005 10:25 am
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

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