Page 1 of 1

To Antonio and ALL : LISTBOX WITH TWO HEADER

Posted: Thu Jun 05, 2008 10:37 am
by Silvio
Can we create on fwh this simple listbox with two header ?
How I must create it ?

Image

Re: To Antonio and ALL : LISTBOX WITH TWO HEADER

Posted: Thu Jun 05, 2008 10:55 am
by Enrico Maria Giordano
Just put the constant strings (Mo, Tu, We, etc.) in the first column.

EMG

Posted: Thu Jun 05, 2008 11:05 am
by Silvio
How ?
the first colums is an header and the user can press on it
can you create a small sample ?

Posted: Thu Jun 05, 2008 11:29 am
by mmercado
Silvio wrote:How ?
the first colums is an header and the user can press on it
can you create a small sample ?
Hi Silvio

Just use pushbuttons instead of the first column in the listbox.

Regards.

Manuel Mercado.

Posted: Thu Jun 05, 2008 12:34 pm
by Silvio
perhaps i not understand how build it, can i insert a pushbutton on a listbox and how ?
i want only save for each day a string as "SSSNSSS"

Posted: Thu Jun 05, 2008 5:45 pm
by Silvio
I not know how make it

Posted: Fri Jun 06, 2008 12:10 am
by James Bott
Put a vertical row of buttons on a dialog, then place a browse right next to it.

Posted: Fri Jun 06, 2008 7:26 am
by Silvio
why U not y to me it is not possible with fwh ?
in Delphi or vb is simply it use a typical listbox why I cannot create it with fwh?

we think to create graphics emotional classes but then we cannot create a simply listbox with two header?

why i must use buttons ?

Posted: Fri Jun 06, 2008 7:41 am
by James Bott
>but then we cannot create a simply listbox with two header?

Maybe because you are the only person that ever asked for it.

How long would it take you to build it using buttons and a browse, maybe 10 minutes?

Posted: Fri Jun 06, 2008 8:00 am
by Silvio
I saw I can create a class from listbox fron listbox control as create("listbox").. can I modify the headers?

Posted: Fri Jun 06, 2008 9:12 am
by Otto
Silvio, you should switch to xBrowse.
Regards,
Otto

Posted: Fri Jun 06, 2008 9:51 am
by Silvio
If you want explain How U are welcome
have you an sample ?

Posted: Fri Jun 06, 2008 4:27 pm
by Otto
I only thought "How would Silvio change the row high with listbox"?
I think this is for listbox more the problem than the second buttonbar.
Regards,
Otto

Posted: Fri Jun 06, 2008 11:37 pm
by Silvio
why it not run ?

Code: Select all

#INCLUDE "FIVEWIN.CH"

Function Main()
Local odlg
Local olbx
LOCAL nLargo
Local aMat   := {}
LOCAL aJus := {}
LOCAL aTit := {}
 LOCAL i
 LOCAL k

AADD( aMat, { "Lunedi" } )
AADD( aMat, { "Martedi" } )
AADD( aMat, { "Mercoledi" } )
AADD( aMat, { "Giovedi" } )
AADD( aMat, { "Venerdì" } )
AADD( aMat, { "Sabato" } )

nLargo := LEN( aMat )

FOR k := 1 TO 8
         AADD( aMat[ nLargo ], SPACE( 10 ) )
NEXT


FOR i := 1 TO 8
      AADD( aJus, 2 )
      AADD( aTit, i )
   NEXT



 DEFINE DIALOG oDlg NAME "AGENDA" ;
 TITLE "Desiderata"

 REDEFINE LISTBOX oLbx FIELDS ""       ;
      HEADERS  ""                          ;
      ID 201 OF oDlg  UPDATE

oLbx:aHeaders  := aTit


oLbx:nAt       := 1
oLbx:bLine     := { || { aMat[ oLbx:nAt, 01 ]        , ;
                         aMat[ oLbx:nAt, 02 ]        , ;
                         aMat[ oLbx:nAt, 03 ]        , ;
                         aMat[ oLbx:nAt, 04 ]        , ;
                         aMat[ oLbx:nAt, 05 ]        , ;
                         aMat[ oLbx:nAt, 06 ]        , ;
                         aMat[ oLbx:nAt, 07 ]        , ;
                         aMat[ oLbx:nAt, 08 ]          ;
                            } }

   oLbx:bGoTop      := { || oLbx:nAt := 1 }
   oLbx:bGoBottom   := { || oLbx:nAt := EVAL( oLbx:bLogicLen ) }
   oLbx:bSkip       := { | nWant, nOld | nOld := oLbx:nAt, oLbx:nAt += nWant,;
                           oLbx:nAt := MAX( 1, MIN( oLbx:nAt, EVAL( oLbx:bLogicLen ) ) ),oLbx:nAt - nOld }
   oLbx:bLogicLen   := { || LEN( aMat ) }
   oLbx:SetArray( aMat )


   oLbx:lCellStyle  := .T.

 ACTIVATE DIALOG oDlg CENTERED

return nil




resource file

Code: Select all

AGENDA DIALOG 39, 25, 378, 199
STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION ""
FONT 8, "Tahoma"
{
 CONTROL "", 201, "TWBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 4, 4, 368, 170
}