Problem Creating ButtonBar Inside Folder Class -- SOLVED

Problem Creating ButtonBar Inside Folder Class -- SOLVED

Postby fraxzi » Wed Feb 24, 2010 12:18 am

Hello All,

I redefine Folder CLass (single page), I want to put ButtonBar inside that page.

I wish to create this sample image

Image

Code: Select all  Expand view

...
REDEFINE FOLDER oFlder ID 1003 OF oDlg;
             PROMPT 'Photos';
             DIALOGS 'DLG_PHOTO' UPDATE
...

            DEFINE BUTTONBAR oBar SIZE 24,24 OF oFlder:aDialogs[ 1 ] 2007

...
 


has runtime error Class" TBAR; "Cannot create a top-levl child window"


Regards,
FAP
Last edited by fraxzi on Wed Feb 24, 2010 2:41 am, edited 1 time in total.
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: Problem Creating ButtonBar Inside Folder Class

Postby ukoenig » Wed Feb 24, 2010 1:26 am

You can use it like ( only included as a test ) :

Image

Code: Select all  Expand view

REDEFINE FOLDER oFld ID 100 OF oDlg UPDATE ;
PROMPTS "&Background  ", "&Circle  ", "&Body  ",  " &Size / Position ", "Base / &Text-Settings  ", " &Text-Select  ", "&Buttons  ", "&Devider " ;
DIALOGS "Painter", "Circle", "TBody", "Background", "Base", "TText", "TButtons", "Devider"  FONT oFoldFont // ;
* ON CHANGE( SetFolder( oWnd, oFld, nOption, nOldOption ) )

FOLDER_1(oDlg,oFld)  // Background
FOLDER_2(oDlg,oFld)  // Circle
FOLDER_3(oDlg,oFld)  // Body
FOLDER_4(oDlg,oFld)  // Position
FOLDER_5(oDlg,oFld)  // Base & Text
FOLDER_6(oDlg,oFld)  // Text
FOLDER_7(oDlg,oFld)  // Buttons
FOLDER_8(oDlg,oFld)  // Devider

ACTIVATE DIALOG oDlg CENTERED ;
ON INIT ( LOAD_DATA(), NEW_ARRAY(), ;
     SetImages(oDlg,oFld), ;
     GradBrush( oDlg, { { 0.50, 14853684, 16314573 }, ;
    { 0.50, 16314573, 14853684 } }, .T. ), PAINT_BAR( oFld ) ) ;
ON PAINT SetFoldGrad( oFld )

RETURN NIL  

// ------ Buttonbar in Folderpage 5 ----------------------------

FUNCTION PAINT_BAR( oFld )
LOCAL oBar

DEFINE BUTTONBAR oBar SIZE 33, 33 _3D OF oFld:aDialogs[5]

DEFINE BUTTON OF oBar FILE c_path + "\System\select.bmp"  ;
ACTION MsgAlert ( "Test" )

DEFINE BUTTON OF oBar FILE c_path + "\System\exit.bmp"  ;
ACTION MsgAlert ( "Test" )

RETURN NIL
 


Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Problem Creating ButtonBar Inside Folder Class -- SOLVED

Postby fraxzi » Wed Feb 24, 2010 2:40 am

Thanks Uwe for you kind reply!


I solved using this approach
Code: Select all  Expand view

...
Activate Dialog
 On Init uDlgBar( oFlder:aDialogs[ 1 ] )
...

FUNCTION uDlgBar( oDlg )
 Local oBar

 DEFINE BUTTONBAR oBar SIZE 26,26 OF oDlg 2007

 DEFINE BUTTON OF oDlg:oBar;
        ACTION MsgInfo('first') RESOURCE 'first16' TRANSPARENT GROUP

 DEFINE BUTTON OF oDlg:oBar;
        ACTION MsgInfo('prev') RESOURCE 'back16' TRANSPARENT

 DEFINE BUTTON OF oDlg:oBar;
        ACTION MsgInfo('next') RESOURCE 'next16' TRANSPARENT

 DEFINE BUTTON OF oDlg:oBar;
        ACTION MsgInfo('last') RESOURCE 'last16' TRANSPARENT

 DEFINE BUTTON OF oDlg:oBar;
        ACTION MsgInfo('add')  RESOURCE 'plus16' TRANSPARENT GROUP

 DEFINE BUTTON OF oDlg:oBar;
        ACTION MsgInfo('del') RESOURCE 'minus16' TRANSPARENT

 DEFINE BUTTON OF oDlg:oBar;
        ACTION MsgInfo('change') RESOURCE 'refresh16' TRANSPARENT


RETURN
 



SEE:
Image

My best Regards,
FAP
Kind Regards,
Frances

Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 94 guests