FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Problem with EDIT_GET_LISTBOX: ADDITIONAL WORK REQUIRED
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Problem with EDIT_GET_LISTBOX: ADDITIONAL WORK REQUIRED
Posted: Sat Feb 27, 2016 07:52 PM

I found, that the value from the get in normal (not editing) mode are not visible. In the moment i will edit the get, this value becomes normal visible. If the value from the get is one of the items from the listbox the value is always visible!
This is in a browse from resource. In a browse from code is normal. But i cannot test if this is relevant!
In a older FWH (13) all was normal.

Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Problem with EDIT_GET_LISTBOX in xBrowse
Posted: Sun Feb 28, 2016 08:02 AM
Can you please try this fix and offer your comments?

Please locate this line of code in Adjust() method of TXBrwColumn. You will find it in two places.
Code (fw): Select all Collapse
::bStrData  := { || XbrLbxLookUp( ::Value, ::aEditListBound, ::aEditListTxt ) }

Change this line as:
Code (fw): Select all Collapse
::bStrData  := { || XbrLbxLookUp( ::Value, ::aEditListBound, ::aEditListTxt, ::nEditType == EDIT_LISTBOX ) }

You need to change this at two places.

Next:
Please locate:
Code (fw): Select all Collapse
static function XbrLbxLookUp( uVal, aBound, aText )

Change this line as:
Code (fw): Select all Collapse
static function XbrLbxLookUp( uVal, aBound, aText, lBlank )


In this function, please locate this line:
Code (fw): Select all Collapse
   uRetVal  := Blank( aText[ 1 ] )

Change this as:
Code (fw): Select all Collapse
   
   DEFAULT lBlank := .t.    
   uRetVal  := If( lBlank, Blank( aText[ 1 ] ), cValToChar( uVal ) )

In case your problem is still not addressed by this change, please provide a small sample to reproduce the problem.
Regards



G. N. Rao.

Hyderabad, India
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: Problem with EDIT_GET_LISTBOX in xBrowse
Posted: Sun Feb 28, 2016 04:21 PM

Mr. Rao, it seems, that this changes are ok! Thanks!

Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: Problem with EDIT_GET_LISTBOX in xBrowse
Posted: Thu Mar 03, 2016 02:09 PM
Mr. Rao, i make the following changes:

1. To add the size of the vert-scroll
Code (fw): Select all Collapse
nWidth   := Max( nWidth, CalcTextWH( ::oBrw, ::aEditListTxt, oFont )[ 1 ] + COL_EXTRAWIDTH + ;
                            IfNil( ::nBtnWidth, 10 ) + GetSysMetrics( 2 ))       //BYTE-ONE


2. To limit the listbox on small browses.
Code (fw): Select all Collapse
   nWidth := min(nWidth,::oBrw:BrwWidth())  //BYTE-ONE
Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: Problem with EDIT_GET_LISTBOX: ADDITIONAL WORK REQUIRED
Posted: Sun Mar 06, 2016 04:34 PM

Mr. Rao, have you seen this. Only small corrections.

And a other suggestion: Can we EDIT_LISTBOX and EDIT_GET_LISTBOX not include also in XbrEditMemo and a own dialog without border if wished? The advantage is, that the size are not limited to the size of xBrowse.

Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Problem with EDIT_GET_LISTBOX: ADDITIONAL WORK REQUIRED
Posted: Mon Mar 07, 2016 01:03 AM
1. This was considered while adopting the changes. The padding provided is adequate to accommodate the scrollbar width (Windows default 17 pixels) also where necessary. By default, the auto-calculated column width and list-box width are exactly the same retaining backward compatibility in appearance of the listbox. You may check this in real cases.

Please test this sample:
Code (fw): Select all Collapse
   local aData := { { "Hello World", 5, "FiveTech SoftWare" }, { "FiveTech", 4, "Hello World" } }
   local aMonths[ 12 ]

   AEval( aMonths, { |u,i| aMonths[ i ] := { i, NToCMONTH( i ) } } )
   xbrowser aData SETUP ( oBrw:aCols[ 2 ]:nEditType := EDIT_LISTBOX, oBrw:aCols[ 2 ]:aEditListTxt := aMonths )




2. This will be adopted.

Last suggestion: EDIT_GET_BUTTON is provided for such purposes.
Regards



G. N. Rao.

Hyderabad, India
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
Re: Problem with EDIT_GET_LISTBOX: ADDITIONAL WORK REQUIRED
Posted: Tue Apr 26, 2016 11:53 AM
Mr. Rao, my impression is, that this point are not done!?
2. To limit the listbox on small browses.
nWidth := min(nWidth,::BrwWidth()) //BYTE-ONE
Regards,
Günther
---------------------------------
office@byte-one.com

Continue the discussion