FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Help with tfolderex
Posts: 114
Joined: Fri Jul 21, 2006 07:15 PM
Help with tfolderex
Posted: Fri Jan 04, 2013 12:51 AM

Good night, someone uses the folderex add item at run time? Add the item ok, but no way to set the icon, below the sample code, changed in the samples folder.

include "FiveWin.ch"

static oWnd,oFld

function main()
local i
local aBitmaps := { "..\bitmaps\alphabmp\exit.bmp", "..\bitmaps\alphabmp\exit.bmp" }
local oGet
local cGet := space(10)

DEFINE WINDOW oWnd TITLE "TFolderex - Testing -" MENU _BuildMenu()

@ 3, 3 FOLDEREX oFld PIXEL ADJUST;
PROMPT "Option 1", "Option 2";//
BITMAPS aBitmaps;
ACTION( ::HideTab( nOption ) );
TOP ALIGN FLDBMP_RIGHT, FLDBMP_RIGHT

@ 5,5 GET oGet var cGet OF oFld:aDialogs[ 1 ]

FOR i = 1 TO Len( oFld:aPrompts )
oFld:SetBrightBmp( "..\bitmaps\alphabmp\exit2.bmp", i )
NEXT

ACTIVATE WINDOW oWnd

RETURN NIL

function _BuildMenu()
local oMenu

MENU oMenu // does not work?
MENUITEM "New" ACTION Buildnew() ,oFld:SetBitmap( "..\bitmaps\alphabmp\exit.bmp" ) )
ENDMENU

Return( oMenu )

function BuildNew()
local oGet
local cGet := Space(10)

oFld:AddItem( "New tab" )
@ 5,5 GET oGet var cGet OF oFld:aDialogs[ Len(oFld:aDialogs ) ]
Return( NIL )

FWH / xHarbour / BCC / MySql

Visual Studio / Harbour / DotNet Maui / C#
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Help with tfolderex
Posted: Fri Jan 04, 2013 06:00 PM
Eroni,

try this
( the new bitmap is defined in the Bmp-array ( 3 ) )
aBitmaps := { c_path1 + "additem.bmp", c_path1 + "additem.bmp", c_path1 + "additem.bmp" }



Your sample :

Code (fw): Select all Collapse
#include "FiveWin.ch"

static oWnd,oFld, c_path1

function main()
local i
local aBitmaps
local oGet
local cGet := space(10)

DEFINE WINDOW oWnd TITLE "TFolderex - Testing -" MENU _BuildMenu() 

c_path := cFilePath(GetModuleFileName( GetInstance() ) ) 
c_path1 := c_path + "SYSTEM\" 
aBitmaps := { c_path1 + "additem.bmp", c_path1 + "additem.bmp", c_path1 + "additem.bmp"  }

@ 3, 3 FOLDEREX oFld PIXEL ADJUST;
PROMPT "Option 1", "Option 2";// 
BITMAPS aBitmaps;
ACTION( ::HideTab( nOption ) );
TOP ALIGN FLDBMP_RIGHT, FLDBMP_RIGHT

@ 5,5 GET oGet var cGet OF oFld:aDialogs[ 1 ]

FOR i = 1 TO Len( oFld:aPrompts )
    oFld:SetBrightBmp( c_path1 + "additem.bmp", i ) 
NEXT

ACTIVATE WINDOW oWnd

RETURN NIL

// --------------

function _BuildMenu()
local oMenu

MENU oMenu // does not work?
MENUITEM "New" ACTION  Buildnew()
ENDMENU

Return( oMenu )

// ----------------

function BuildNew()
local oGet
local cGet := Space(10)

oFld:AddItem( "New tab" )
oFld:SetBrightBmp( oFld:aBitmaps[Len(oFld:aDialogs)], Len(oFld:aDialogs ) )
oFld:aAlign[Len(oFld:aDialogs)] := 1

@ 5,5 GET oGet var cGet OF oFld:aDialogs[ Len(oFld:aDialogs ) ] 

Return( NIL )


Best Regards
Uwe :-)
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.
Posts: 114
Joined: Fri Jul 21, 2006 07:15 PM
Re: Help with tfolderex
Posted: Fri Jan 04, 2013 06:51 PM
Uwe, Ok, I did not want to leave the preset amount of tabs, but thats ok, I will create an array with a maximum number possible, thanks for the tip.
It would be possible to navigate folderex like the screen below?

Many thanks!
FWH / xHarbour / BCC / MySql

Visual Studio / Harbour / DotNet Maui / C#
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: Help with tfolderex
Posted: Fri Jan 04, 2013 08:10 PM

Hello

folderex have not this feature, you can use a multiline

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Help with tfolderex
Posted: Fri Jan 04, 2013 08:48 PM
You can change from TFolderEx to TFolder to use this Tabs.



@ 3, 3 FOLDEREX oFld OF oWnd PIXEL SIZE 280,220 ;
PROMPT "Option 1", "Option 2";//
BITMAPS aBitmaps;
ACTION( ::HideTab( nOption ) );
TOP ALIGN FLDBMP_RIGHT, FLDBMP_RIGHT

@ 5,5 GET oGet var cGet OF oFld:aDialogs[ 1 ]

FOR i = 1 TO Len( oFld:aPrompts )
oFld:SetBrightBmp( c_path1 + "additem.bmp", i )
NEXT

@ 3, 300 FOLDER oFld1 PROMPT "&xBase", "&And OOP", "&Power", "Page 4", "Page 5" ;
OF oWnd PIXEL SIZE 160, 150

Best Regards
Uwe :-)
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.
Posts: 114
Joined: Fri Jul 21, 2006 07:15 PM
Re: Help with tfolderex
Posted: Mon Jan 07, 2013 05:42 PM

Uwe, Daniel, many thanks.

Eroni

FWH / xHarbour / BCC / MySql

Visual Studio / Harbour / DotNet Maui / C#

Continue the discussion