Problem with EDIT_GET_LISTBOX: ADDITIONAL WORK REQUIRED

Problem with EDIT_GET_LISTBOX: ADDITIONAL WORK REQUIRED

Postby byte-one » Sat Feb 27, 2016 7: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.
Last edited by byte-one on Fri Mar 04, 2016 5:12 pm, edited 2 times in total.
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Problem with EDIT_GET_LISTBOX in xBrowse

Postby nageswaragunupudi » Sun Feb 28, 2016 8: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: Select all  Expand view  RUN
::bStrData  := { || XbrLbxLookUp( ::Value, ::aEditListBound, ::aEditListTxt ) }
 

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

You need to change this at two places.

Next:
Please locate:
Code: Select all  Expand view  RUN
static function XbrLbxLookUp( uVal, aBound, aText )
 

Change this line as:
Code: Select all  Expand view  RUN
static function XbrLbxLookUp( uVal, aBound, aText, lBlank )
 


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

Change this as:
Code: Select all  Expand view  RUN
 
   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
User avatar
nageswaragunupudi
 
Posts: 10690
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Problem with EDIT_GET_LISTBOX in xBrowse

Postby byte-one » Sun Feb 28, 2016 4:21 pm

Mr. Rao, it seems, that this changes are ok! Thanks!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Problem with EDIT_GET_LISTBOX in xBrowse

Postby byte-one » Thu Mar 03, 2016 2:09 pm

Mr. Rao, i make the following changes:

1. To add the size of the vert-scroll
Code: Select all  Expand view  RUN
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: Select all  Expand view  RUN
  nWidth := min(nWidth,::oBrw:BrwWidth())  //BYTE-ONE
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Problem with EDIT_GET_LISTBOX: ADDITIONAL WORK REQUIRED

Postby byte-one » Sun Mar 06, 2016 4: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
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Problem with EDIT_GET_LISTBOX: ADDITIONAL WORK REQUIRED

Postby nageswaragunupudi » Mon Mar 07, 2016 1: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: Select all  Expand view  RUN
  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 )
 


Image

2. This will be adopted.

Last suggestion: EDIT_GET_BUTTON is provided for such purposes.
Regards

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

Re: Problem with EDIT_GET_LISTBOX: ADDITIONAL WORK REQUIRED

Postby byte-one » 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,::oBrw:BrwWidth()) //BYTE-ONE
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 88 guests