Help with tfolderex

Post Reply
User avatar
Eroni
Posts: 71
Joined: Fri Jul 21, 2006 7:15 pm
Location: Criciuma/SC Brazil
Contact:

Help with tfolderex

Post by Eroni »

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
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: Help with tfolderex

Post by ukoenig »

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

#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
Eroni
Posts: 71
Joined: Fri Jul 21, 2006 7:15 pm
Location: Criciuma/SC Brazil
Contact:

Re: Help with tfolderex

Post by Eroni »

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
Daniel Garcia-Gil
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita
Contact:

Re: Help with tfolderex

Post by Daniel Garcia-Gil »

Hello

folderex have not this feature, you can use a multiline
our best documentation is the source code
Isla de Margarita Venezuela.
danielgarciagil@gmail.com
http://tdolphin.blogspot.com/
https://www.dropbox.com/referrals/NTI5N ... rc=global9
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: Help with tfolderex

Post by ukoenig »

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
Eroni
Posts: 71
Joined: Fri Jul 21, 2006 7:15 pm
Location: Criciuma/SC Brazil
Contact:

Re: Help with tfolderex

Post by Eroni »

Uwe, Daniel, many thanks.

Eroni
FWH 1709 BCC72 MySql MariaDB
Visual Studio 2019 / Xamarin / C#
Post Reply