Help with tfolderex

Help with tfolderex

Postby Eroni » 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 1709 BCC72 MySql MariaDB
Visual Studio 2019 / Xamarin / C#
User avatar
Eroni
 
Posts: 90
Joined: Fri Jul 21, 2006 7:15 pm
Location: Criciuma/SC Brazil

Re: Help with tfolderex

Postby ukoenig » Fri Jan 04, 2013 6: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" }

Image

Your sample :

Code: Select all  Expand view

#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 :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: Help with tfolderex

Postby Eroni » Fri Jan 04, 2013 6: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?
Image
Many thanks!
FWH 1709 BCC72 MySql MariaDB
Visual Studio 2019 / Xamarin / C#
User avatar
Eroni
 
Posts: 90
Joined: Fri Jul 21, 2006 7:15 pm
Location: Criciuma/SC Brazil

Re: Help with tfolderex

Postby Daniel Garcia-Gil » Fri Jan 04, 2013 8:10 pm

Hello

folderex have not this feature, you can use a multiline
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: Help with tfolderex

Postby ukoenig » Fri Jan 04, 2013 8:48 pm

You can change from TFolderEx to TFolder to use this Tabs.

Image

@ 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 :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: Help with tfolderex

Postby Eroni » Mon Jan 07, 2013 5:42 pm

Uwe, Daniel, many thanks.

Eroni
FWH 1709 BCC72 MySql MariaDB
Visual Studio 2019 / Xamarin / C#
User avatar
Eroni
 
Posts: 90
Joined: Fri Jul 21, 2006 7:15 pm
Location: Criciuma/SC Brazil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Otto and 74 guests