Configuration buttons ribbon bar

Configuration buttons ribbon bar

Postby Silvio » 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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: Configuration buttons ribbon bar

Postby Antonio Linares » Mon Dec 14, 2009 7: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Configuration buttons ribbon bar

Postby Silvio » Tue Dec 15, 2009 8:14 am

I try your tree checkbox sample but there is error
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: Configuration buttons ribbon bar

Postby Silvio » Tue Dec 15, 2009 9: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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: Configuration buttons ribbon bar

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Configuration buttons ribbon bar

Postby Antonio Linares » Tue Dec 15, 2009 12:17 pm

Silvio,

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

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Configuration buttons ribbon bar

Postby Silvio » Tue Dec 15, 2009 12:43 pm

have try to click on each check box ?
it make me error
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: Configuration buttons ribbon bar

Postby Silvio » Tue Dec 15, 2009 12:55 pm

and to insert a bmp for each record wich is the command ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: Configuration buttons ribbon bar

Postby Silvio » Tue Dec 15, 2009 1: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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: Configuration buttons ribbon bar

Postby Antonio Linares » Tue Dec 15, 2009 2: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Configuration buttons ribbon bar

Postby Silvio » Tue Dec 15, 2009 2:20 pm

Code: Select all  Expand view
// 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
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: Configuration buttons ribbon bar

Postby Antonio Linares » Tue Dec 15, 2009 2:45 pm

Silvio,

Please check that you have this code in Class TTreeView:
Code: Select all  Expand view

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
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 63 guests

cron