FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Configuration buttons ribbon bar
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Configuration buttons ribbon bar
Posted: Mon Dec 14, 2009 12:39 PM

I thinked to create a small listbox with chechbox with all buttons of the ribbonbar
How I can make this ?

Any Idea ?

Best Regards, Saludos



Falconi Silvio
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Configuration buttons ribbon bar
Posted: Mon Dec 14, 2009 07:45 PM

Silvio,

You could use a browse or an ownerdraw listbox.

The browse will provide you more possibilities.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: Configuration buttons ribbon bar
Posted: Tue Dec 15, 2009 08:14 AM

I try your tree checkbox sample but there is error

Best Regards, Saludos



Falconi Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: Configuration buttons ribbon bar
Posted: Tue Dec 15, 2009 09:27 AM

Antonio,
Can I have a small sample to create a Tree with checkbox from database

the database can be in this structure

NAME FIELD TYPE SIZE
Code C 6
desc C 30
BMP N 9
CHECK L 1

I want insert different bitmaps for each record

Best Regards, Saludos



Falconi Silvio
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Configuration buttons ribbon bar
Posted: Tue Dec 15, 2009 10:07 AM

Silvio,

On each post you ask for a different thing :-)

You have enough technical skills to try it for yourself :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Configuration buttons ribbon bar
Posted: Tue Dec 15, 2009 12:17 PM
Silvio,

FWH\samples\TreeChck.prg is working fine here using FWH 9.11:

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: Configuration buttons ribbon bar
Posted: Tue Dec 15, 2009 12:43 PM

have try to click on each check box ?
it make me error

Best Regards, Saludos



Falconi Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: Configuration buttons ribbon bar
Posted: Tue Dec 15, 2009 12:55 PM

and to insert a bmp for each record wich is the command ?

Best Regards, Saludos



Falconi Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: Configuration buttons ribbon bar
Posted: Tue Dec 15, 2009 01:05 PM
Antonio,
Why there is a checkbox also for the first node ?

Principal no checkbox
Imprimpir yes checkbox


I can make a tree type it ?
Best Regards, Saludos



Falconi Silvio
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Configuration buttons ribbon bar
Posted: Tue Dec 15, 2009 02:13 PM

Silvio,

> have try to click on each check box ?

Yes, here it works fine on Windows 7 Ultimate 32 bits.

> it make me error

What error is it ? Please provide an accurate feedback so we can properly help you.

You are not a novice in these forums :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: Configuration buttons ribbon bar
Posted: Tue Dec 15, 2009 02:20 PM
Code (fw): Select all Collapse
// Using a TreeView with checkboxes and checking their status

#include "FiveWin.ch"

function Main()

   local oDlg, oTree

   DEFINE DIALOG oDlg

      oTree = TTreeView():New( 0, 0, oDlg,,,,,200,200,,.t.)

      oTree:OnClick = { || CheckStatus( oTree, oTree:aItems ) }

   ACTIVATE DIALOG oDlg CENTERED ON INIT BuildTree( oTree )

return nil 

function BuildTree( oTree ) 

   local oMenu := Array( 2 ), oSubMenu := Array( 3 ) 

   oMenu[ 1 ]:= oTree:Add( "Principal" ) 
      oSubMenu[ 1 ]:= oMenu[ 1 ]:Add( "Imprimir..." )
      oSubMenu[ 1 ]:SetCheck( .T. ) 

   oMenu[ 2 ]:= oTree:Add( "Proyectos" ) 
      oSubMenu[ 2 ]:= oMenu[ 2 ]:Add( "Definir Proyectos" ) 
      oSubmenu[ 3 ]:= oMenu[ 2 ]:Add( "Actualización datos" ) 

   oTree:Expand() 

return nil 

function CheckStatus( oTree, aItems )

   local n
   
   for n = 1 to Len( aItems )
      MsgInfo( oTree:GetCheck( aItems[ n ] ) )
      CheckStatus( oTree, aItems[ n ]:aItems )
   next
   
return nil





Application
===========
Path and name: C:\work\FWH\samples\testtre5.Exe (32 bits)
Size: 1,863,680 bytes
Time from start: 0 hours 0 mins 4 secs
Error occurred at: 12/15/09, 15:01:35
Error description: Error BASE/1004 Class: 'NIL' has no exported method: CPROMPT
Args:
[ 1] = U

Stack Calls
===========
Called from: => CPROMPT(0)
Called from: .\source\classes\TTREEVIE.PRG => TTREEVIEW:HANDLEEVENT(282)
Called from: .\source\classes\WINDOW.PRG => _FWH(3347)
Called from: => DIALOGBOXINDIRECT(0)
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(273)
Called from: testtre5.prg => MAIN(15)
Best Regards, Saludos



Falconi Silvio
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Configuration buttons ribbon bar
Posted: Tue Dec 15, 2009 02:45 PM
Silvio,

Please check that you have this code in Class TTreeView:
Code (fw): Select all Collapse
METHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS TTreeView

   local oItem

   do case
      case nMsg == WM_CHAR
           if nWParam == VK_RETURN
              return 1
           endif
   endcase
   
return Super:HandleEvent( nMsg, nWParam, nLParam )
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion