xBrowse with MARQSTYLE_HIGHLROWRC?

xBrowse with MARQSTYLE_HIGHLROWRC?

Postby JC » Sat Aug 16, 2008 12:44 pm

Dear Antonio and friends!

I liked very much this style of selected row on xBrowse!
It is the MARQSTYLE_HIGHLROWRC style, but when I try to use this style into my application... it don't have the same effect!

Why don't?
Please, someone have a tip for me?

The xBrowse with MARQSTYLE_HIGHLROWRC into SAMPLES of fivewin:
Image

My xBrowse with MARQSTYLE_HIGHLROWRC:
Image
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

xbrowse-Styles

Postby ukoenig » Sat Aug 16, 2008 1:23 pm

Hello Júlio,

in the moment, i'm busy with creating
some more pages for the xbrowse-Tools ( styles, backgrounds....)
The 2. page is prepared for style- and background-testing.
In the future you can test all styles, brushes, bitmaps, fonts..
with preview.
Style-testing i have done in my old tools already.
I still have to add the functions to the new Tools.
The needed source is created together with the preview.
Maybe i have the time this weekend, to include it.
The Tool-release will be => 1c.

Image

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

Postby JC » Sat Aug 16, 2008 6:09 pm

Thanks Uwe, but I like to use this style into my application with Fivewin 8.06.
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Lines in xBrowse

Postby ukoenig » Sat Aug 16, 2008 6:19 pm

Hello,

No problem, only Gradients for Header and Footer you cannot
use in FWH 8.06

The Line-preview, you can use in FWH 8.06 as well.
There is no change.
The source you can copy and past from the field < background and styles >. You can mix all settings, until you think it is ok.
I will finish this part. Background and Brushes comes later.
Tomorrow the new Release < 1c > will be in the forum.
The picture shows the setting for your hightlight cell.

Setting for Cell-Highlight ( Browser-pos. 3 )

oBrw:nMarqueeStyle := MARQSTYLE_HIGHLCELL
----------------------------------------------------------

Setting for Row-Highlight

oBrw:nMarqueeStyle := MARQSTYLE_HIGHLROWRC
-------------------------------------------------------------

Image

Regards
Uwe :lol:
Last edited by ukoenig on Sat Aug 16, 2008 8:39 pm, edited 1 time in total.
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

Postby nageswaragunupudi » Sat Aug 16, 2008 7:10 pm

Mr JC

>
liked very much this style of selected row on xBrowse!
It is the MARQSTYLE_HIGHLROWRC style, but when I try to use this style into my application... it don't have the same effect!
>

Answer to your question is in the testxbrw3.prg source itself.

Code: Select all  Expand view  RUN
   oBrw:bClrRowFocus    := { || { CLR_BLACK, RGB(185,220,255) } }
   oBrw:nMarqueeStyle   := MARQSTYLE_HIGHLROWMS


I do not know if this was implemented in version 8.05. You may try the above code and try.

You will learn more from studying the source code of testxbrw3.prg ( The way I learnt )
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby Antonio Linares » Sat Aug 16, 2008 7:18 pm

Dear Uwe,

Your "visual" tools are great, bur instead of building a different one for different controls, why don't you try to build a generic "object inspector" for all of them ?

I mean: one "object inspector" that will work with all sort of controls.

Please have a look to this thread :-)
http://forums.fivetechsoft.com/viewtopic.php?t=12187
regards, saludos

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

Obj-inspector

Postby ukoenig » Sat Aug 16, 2008 8:14 pm

Dear Antonio,

A few month ago, as i started with tools,
there was a try, to create a tool for all controls.
Many things came together like project-handling and more.
I think, when the controls are tested in visual-design, the next step
could be, putting everything together.

I will keep it in mind.

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

Postby Antonio Linares » Sun Aug 17, 2008 1:42 am

Uwe,

Here you have an early prototype so you can check it:

test.prg
Code: Select all  Expand view  RUN
#include "FiveWin.ch"
#include "XBrowse.ch"

function Main()

   local oWnd, oBrw, aData := { { PadR( "One", 10 ), PadR( "Two", 10 ), PadR( "Three", 10 ) },;
                                { "Four", "Five", "Six" } }

   DEFINE WINDOW oWnd TITLE "XBrowse"

   @ 0, 0 XBROWSE oBrw ARRAY aData AUTOCOLS // FOOTERS

   oBrw:aCols[ 1 ]:cHeader = "Header1"
   oBrw:aCols[ 2 ]:cHeader = "Header2"
   oBrw:aCols[ 3 ]:cHeader = "Header3"

   // oBrw:aCols[ 1 ]:cFooter = "Header1"
   // oBrw:aCols[ 2 ]:cFooter = "Header2"
   // oBrw:aCols[ 3 ]:cFooter = "Header3"

   oWnd:oClient = oBrw

   ACTIVATE WINDOW oWnd ;
      ON INIT Inspect( oBrw )

return nil

function Inspect( oControl )

   local oWnd, oBrw
   local aData := { { "Marquee", "SolidCell", EDIT_LISTBOX,;
                    { "NoMarquee", "DotedCell", "SolidCell", "HighLCell", "HightLRowRC", "HighLRow", "HighLRowMS" },;
                    { | oCol, uVal, nKey | If( nKey != VK_ESCAPE, ( aData[ oBrw:nArrayAt ][ 2 ] := uVal, uVal := AScan( oCol:aEditListTxt, uVal ) - 1, oControl:nMarqueeStyle := uVal, oControl:Refresh() ),) } },;
                    { "Columns", "<objects>", EDIT_LISTBOX, GenColumnsList( oControl ),;
                    { | oCol, uVal, nKey | If( nKey != VK_ESCAPE, SelColumn( oBrw, oControl, uVal ),) } } }
   
   DEFINE WINDOW oWnd TITLE "Object inspector" FROM 10, 10 TO 40, 48
   
   oWnd:ToolWindow()

   @ 0, 0 XBROWSE oBrw ARRAY aData COLUMNS 1, 2 COLSIZES 100, 140 ;
      ON CHANGE SetEditType( oBrw, aData )
   
   oBrw:nMarqueeStyle = MARQSTYLE_HIGHLROW
   // oBrw:lFastEdit = .T. only compatible with MARQSTYLE_HIGHLCELL
   // oBrw:nStretchCol = 2 // crashes with EDIT_LISTBOX and EDIT_BUTTON for now
   oBrw:aCols[ 1 ]:cHeader = "Property"
   oBrw:aCols[ 2 ]:cHeader = "Value"
   // oBrw:lRecordSelector := .F.
   oBrw:aCols[ 1 ]:bLDClickData = { || oBrw:aCols[ 2 ]:Edit() }

   oWnd:oClient = oBrw

   oWnd:bReSized = { || oBrw:aCols[ 2 ]:nWidth := oWnd:nWidth - oBrw:aCols[ 1 ]:nWidth - 63 }
   
   oWnd:Show()

return nil

function SetEditType( oBrw, aData )

   local nEditType := aData[ oBrw:nArrayAt ][ 3 ]
   local oCol := oBrw:aCols[ 2 ]
   
   oCol:nEditType := nEditType
   
   do case
      case nEditType == EDIT_LISTBOX
           oCol:aEditListTxt   = aData[ oBrw:nArrayAt ][ 4 ]
           oCol:aEditListBound = aData[ oBrw:nArrayAt ][ 4 ] // remove this if you want the index, not the string
           if ! Empty( aData[ oBrw:nArrayAt ][ 5 ] )
              oCol:bOnPostEdit = aData[ oBrw:nArrayAt ][ 5 ]
           endif   
           
      case nEditType == EDIT_BUTTON
           oCol:bEditBlock = aData[ oBrw:nArrayAt ][ 4 ] // whatever is returned by the codeblock, it will be asigned
   endcase
   
return nil 

function SelectColumn( oBrw, oControl, aData )

   aData := { { "Header", oControl:aCols[ 1 ]:cHeader, EDIT_GET } }

   oBrw:aCols := nil
   oBrw:SetArray( aData )
   oBrw:aCols[ 2 ]:bOnPostEdit = nil
   oBrw:Refresh()

return oControl:aCols[ 1 ]:cHeader
         
function GenColumnsList( oBrw )

   local aData := {}, n
   
   for n = 1 to Len( oBrw:aCols )
      AAdd( aData, "Column " + AllTrim( Str( n ) ) )
   next
   
return aData     

function SelColumn( oBrwInsp, oBrw, uVal )

   MsgInfo( uVal )
   
return uVal   

Here you have the PRG and the EXE to run it:
http://rapidshare.com/files/137873544/xbrwinsp.zip.html
regards, saludos

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

Postby Antonio Linares » Sun Aug 17, 2008 1:45 am

Image
regards, saludos

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

Postby Antonio Linares » Sun Aug 17, 2008 7:37 am

using a Class TProperty:

test.prg
Code: Select all  Expand view  RUN
#include "FiveWin.ch"
#include "XBrowse.ch"

function Main()

   local oWnd, oBrw, aData := { { PadR( "One", 10 ), PadR( "Two", 10 ), PadR( "Three", 10 ) },;
                                { "Four", "Five", "Six" } }

   DEFINE WINDOW oWnd TITLE "XBrowse"

   @ 0, 0 XBROWSE oBrw ARRAY aData AUTOCOLS // FOOTERS

   oBrw:aCols[ 1 ]:cHeader = "Header1"
   oBrw:aCols[ 2 ]:cHeader = "Header2"
   oBrw:aCols[ 3 ]:cHeader = "Header3"

   // oBrw:aCols[ 1 ]:cFooter = "Header1"
   // oBrw:aCols[ 2 ]:cFooter = "Header2"
   // oBrw:aCols[ 3 ]:cFooter = "Header3"

   oWnd:oClient = oBrw

   ACTIVATE WINDOW oWnd ;
      ON INIT InspectBrowse( oBrw )

return nil

function InspectBrowse( oBrw )

   local aProps := {}, oProp
   
   AAdd( aProps, oProp := TProperty():New() )
   oProp:oObject  = oBrw
   oProp:cName    = "Marquee"
   oProp:nEditType  = EDIT_LISTBOX
   oProp:bValues  = { || { "NoMarquee", "DotedCell", "SolidCell", "HighLCell", "HightLRowRC", "HighLRow", "HighLRowMS" } }
   oProp:bOnRead  = { | oProp | oProp:GetLabel( oBrw:nMarqueeStyle + 1 ) }
   oProp:bOnWrite = { | oProp, oCol, uValue, nKey | uValue := oProp:GetIndex( uValue ), If( nKey != VK_ESCAPE, ( oBrw:nMarqueeStyle := uValue - 1, oBrw:Refresh() ),) }

   AAdd( aProps, oProp := TProperty():New() )
   oProp:oObject  = oBrw
   oProp:cName    = "Columns"
   oProp:nEditType  = EDIT_LISTBOX
   oProp:bValues  = { || GenColumnsList( oBrw ) }
   oProp:bOnRead  = { | oProp | "<array>" }
   oProp:bOnWrite = { | oProp, oCol, uValue, nKey | MsgInfo( uValue ) }

   AAdd( aProps, oProp := TProperty():New() )
   oProp:oObject  = oBrw
   oProp:cName    = "Top"
   oProp:nEditType  = EDIT_GET
   oProp:bOnRead  = { | oProp | Str( oBrw:nTop ) }
   oProp:bOnWrite = { | oProp, oCol, uValue, nKey | oProp:nTop := uValue }

   AAdd( aProps, oProp := TProperty():New() )
   oProp:oObject  = oBrw
   oProp:cName    = "Left"
   oProp:nEditType  = EDIT_GET
   oProp:bOnRead  = { | oProp | Str( oBrw:nLeft ) }
   oProp:bOnWrite = { | oProp, oCol, uValue, nKey | oProp:nLeft := uValue }

   AAdd( aProps, oProp := TProperty():New() )
   oProp:oObject  = oBrw
   oProp:cName    = "Width"
   oProp:nEditType  = EDIT_GET
   oProp:bOnRead  = { | oProp | Str( oBrw:nWidth ) }
   oProp:bOnWrite = { | oProp, oCol, uValue, nKey | oProp:nWidth := uValue }

   AAdd( aProps, oProp := TProperty():New() )
   oProp:oObject  = oBrw
   oProp:cName    = "Height"
   oProp:nEditType  = EDIT_GET
   oProp:bOnRead  = { | oProp | Str( oBrw:nHeight ) }
   oProp:bOnWrite = { | oProp, oCol, uValue, nKey | oProp:nHeight := uValue }

   AAdd( aProps, oProp := TProperty():New() )
   oProp:oObject    = oBrw
   oProp:cName      = "ArrayAt"
   oProp:nEditType  = EDIT_GET
   oProp:bOnRead    = { | oProp | Str( oBrw:nArrayAt ) }
   oProp:bOnWrite   = { | oProp, oCol, uValue, nKey | oProp:nArrayAt := uValue }
   
   Inspect( oBrw, aProps )
   
return nil           

function Inspect( oControl, aProps )

   local oWnd, oBrw, aData := {}, n
   
   for n = 1 to Len( aProps )
     AAdd( aData, { aProps[ n ]:cName, "" } )
   next   
   
   DEFINE WINDOW oWnd TITLE "Object inspector" FROM 10, 10 TO 40, 48
   
   oWnd:ToolWindow()

   @ 0, 0 XBROWSE oBrw ARRAY aData COLUMNS 1, 2 COLSIZES 100, 140 ;
      ON CHANGE SetEditType( oBrw, aProps )
   
   oBrw:aCols[ 2 ]:bStrData  = { || Eval( aProps[ oBrw:nArrayAt ]:bOnRead, aProps[ oBrw:nArrayAt ] ) }
   oBrw:aCols[ 2 ]:nEditType = aProps[ oBrw:nArrayAt ]:nEditType
   
   oBrw:nMarqueeStyle = MARQSTYLE_HIGHLROW
   // oBrw:lFastEdit = .T. only compatible with MARQSTYLE_HIGHLCELL
   // oBrw:nStretchCol = 2 // crashes with EDIT_LISTBOX and EDIT_BUTTON for now
   oBrw:aCols[ 1 ]:cHeader = "Property"
   oBrw:aCols[ 2 ]:cHeader = "Value"
   // oBrw:lRecordSelector := .F.
   oBrw:aCols[ 1 ]:bLDClickData = { || oBrw:aCols[ 2 ]:Edit() }
   
   oControl:bResized = { || oBrw:Refresh() }
   oControl:bChange  = { || oBrw:Refresh() }

   oWnd:oClient = oBrw

   oWnd:bReSized = { || oBrw:aCols[ 2 ]:nWidth := oWnd:nWidth - oBrw:aCols[ 1 ]:nWidth - 63 }
   
   oWnd:Show()

return nil

function SetEditType( oBrw, aProps )

   local oProp   := aProps[ oBrw:nArrayAt ]
   local nEditType := oProp:nEditType
   local oCol    := oBrw:aCols[ 2 ]
   
   oCol:nEditType( nEditType )
   
   do case
      case nEditType == EDIT_GET
           
      case nEditType == EDIT_LISTBOX
           oCol:aEditListTxt   = Eval( oProp:bValues )
           oCol:aEditListBound = Eval( oProp:bValues ) // remove this if you want the index, not the string
           oCol:bOnPostEdit    = { | oCol, uValue, nKey | Eval( oProp:bOnWrite, oProp, oCol, uValue, nKey ) }
           
      case nEditType == EDIT_BUTTON
           oCol:bEditBlock = oProp:bOnWrite // whatever is returned by the codeblock, it will be asigned
   endcase
   
return nil 

function SelectColumn( oBrw, oControl, aData )

   aData := { { "Header", oControl:aCols[ 1 ]:cHeader, EDIT_GET } }

   oBrw:aCols := nil
   oBrw:SetArray( aData )
   oBrw:aCols[ 2 ]:bOnPostEdit = nil
   oBrw:Refresh()

return oControl:aCols[ 1 ]:cHeader
         
function GenColumnsList( oBrw )

   local aData := {}, n
   
   for n = 1 to Len( oBrw:aCols )
      AAdd( aData, "Column " + AllTrim( Str( n ) ) )
   next
   
return aData     

function SelColumn( oBrwInsp, oBrw, uVal )

   MsgInfo( uVal )
   
return uVal   

CLASS TProperty

   DATA   oObject
   DATA   cName
   DATA   bValues
   DATA   nEditType
   DATA   bOnRead
   DATA   bOnWrite
   
   METHOD New() INLINE Self
   METHOD GetLabel( nIndex ) INLINE Eval( ::bValues )[ nIndex ]
   METHOD GetIndex( uValue ) INLINE AScan( Eval( ::bValues ), uValue )
   
ENDCLASS   

source code and EXE:
http://rapidshare.com/files/137914299/i ... r.zip.html

Image
regards, saludos

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

Propertys

Postby ukoenig » Sun Aug 17, 2008 10:32 pm

Dear Antonio,

to do it this way, seems to be a better solution.
The difference is, propertys itself are selected sometimes
from previews as well.
( not as a text-selection from a listbox )

A sample ( only NO LINES is a property )
NO LINES comes from STYLE but belongs to a new GRID-selection :

Image


I don't know, if it is possible to ínclude this in a object-inspector for the moment
( but everything can be done better ).

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

Postby JC » Mon Aug 18, 2008 11:12 am

nageswaragunupudi wrote:Mr JC

>
liked very much this style of selected row on xBrowse!
It is the MARQSTYLE_HIGHLROWRC style, but when I try to use this style into my application... it don't have the same effect!
>

Answer to your question is in the testxbrw3.prg source itself.

Code: Select all  Expand view  RUN
   oBrw:bClrRowFocus    := { || { CLR_BLACK, RGB(185,220,255) } }
   oBrw:nMarqueeStyle   := MARQSTYLE_HIGHLROWMS


I do not know if this was implemented in version 8.05. You may try the above code and try.

You will learn more from studying the source code of testxbrw3.prg ( The way I learnt )



Dear Nages, your tip works very fine! Thank you very much! Now, it's ok!
Peace and lighting!

Júlio César M. Ferreira

FWH 8.10 / xHB 1.1.0 / xDevStudio 0.72 / Pelles C 5.0.1 / SQLLIB 1.9
User avatar
JC
 
Posts: 445
Joined: Thu Feb 21, 2008 11:58 am
Location: Brazil

Postby Antonio Linares » Mon Aug 18, 2008 12:22 pm

Uwe,

See how easy we can add new properties to inspect with the object inspector:
Image
[/code]
In just some minutes we can add all the properties that we want to inspect.
regards, saludos

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

Postby Antonio Linares » Mon Aug 18, 2008 12:28 pm

regards, saludos

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

Rapidshare

Postby ukoenig » Mon Aug 18, 2008 1:01 pm

Antonio,

every time, i connect to RAPIDSHARE, it doesn't work.
My internet-connection is very fast. ( Hightspeed )
This programm tells me, if i am a AOL-customer
to use a different browser.

This program tells me, my connection is to slow.

Image

Maybe the problem occurs, because i'm using AOL.

!!! I got it with a E-mail from James !!! it is OK
--------------------------------------------------------
--------------------------------------------------------
--------------------------------------------------------

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], Marc Venken and 97 guests