ListBox Input Field Scrolling........

ListBox Input Field Scrolling........

Postby RiazKhan » Fri Apr 15, 2022 8:51 am

I have a Listbox defined, in which the user inputs data in text..
The variable size is 90 characters, the input field is 40 characters.
Is it possible to have the input text scroll horizontally to get the complete text?
In ListBox....

The blue input field is in focus and the user input to scroll....Is this possible with ListBox..??
OR...just simply increase the row size...???

Any thoughts....

Image
FWH 20.04/Harbour3.2/Bcc7.40+/ilink32/Pelles 9.0
EMail: amriazkhan@gmail.com
Pakistan
User avatar
RiazKhan
 
Posts: 97
Joined: Fri Dec 16, 2011 3:30 pm
Location: Pakistan

Re: ListBox Input Field Scrolling........

Postby nageswaragunupudi » Fri Apr 15, 2022 8:59 am

Is your listox is XBrowse?
Regards

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

Re: ListBox Input Field Scrolling........

Postby RiazKhan » Fri Apr 15, 2022 9:28 am

The class used in the RES dialog file is TWBrowse...

Source...
REDEFINE LISTBOX oBrw ;
FIELDS aAcc_No[ nItem ] ,;
P6_Mast->(DbSeek(Trim(PadCode1(aAcc_No[ nItem ]))),P6_Mast->Acc_Name) ,;
aAcc_Desc[ nItem ] ,;
If(!Empty(aTrn_AmtD[ nItem ]),TransForm(aTrn_AmtD[ nItem ],'99,999,999,999.99 '),' ') ,;
If(!Empty(aTrn_AmtC[ nItem ]),TransForm(aTrn_AmtC[ nItem ],'99,999,999,999.99 '),' ') ;
HEADERS "G/L Code","Account Title","Description","Debit","Credit" ;
FIELDSIZES 110,235,345,130,130 ;
FONT oFntAE ;
ID 1114 OF oDlg ;
ON CHANGE (P6_Mast->(DbSeek(Trim(PadCode1(aAcc_No[ nItem ])))) ,;
cName:=P6_Mast->Acc_Name ,;
oSay11:Refresh() ,;
oSay21:Refresh() ,;
oSay31:Refresh())

oBrw:nClrForeHead := 0
oBrw:nClrBackHead := 8778750 &&..Cream

//oBrw:bLDblClick:= {|| oBrw:ShowSizes() }

oBrw:nLineStyle:= 3

oBrw:aJustify := { .F.,.F., .F., .T., .T. }

oBrw:bGoTop := { || nItem := 1 }
oBrw:bGoBottom := { || nItem := Len(aAcc_No) }
oBrw:SetArray( aAcc_No, aAcc_Desc, aTrn_AmtD, aTrn_AmtC )
oBrw:bSkip := { |nWant, nOld| nOld:=nItem, nItem+=nWant, ;
nItem := max( 1, min( nItem, eval( oBrw:bLogicLen ))), nItem - nOld }

oBrw:bLDblClick:= {|| W_21AEU(oBrw,nItem,mMode,oDlg)}

oBrw:bKeyDown := {|nKey| If(nKey=13,W_21AEU(oBrw,nItem,mMode,oDlg), ;
If(nKey=46,(W_21AED(nItem), oBrw:SetFocus(.T.)), ;
If(nKey=45,(Empty_Ins(nItem), oBrw:Refresh(), oBrw:SetFocus(.T.), ;
W_21AEU(oBrw,nItem,mMode,oDlg),oSay11:Refresh(),oSay21:Refresh(), ;
oSay31:Refresh()),)))}

oBrw:nClrText := {|| SelColor(1,nItem)}
oBrw:nClrPane := {|| SelColor(2,nItem)}
oBrw:nClrForeFocus := {|| SelColor(3,nItem)}

On key press {Enter].. fuction called ..To edit columns...
FWH 20.04/Harbour3.2/Bcc7.40+/ilink32/Pelles 9.0
EMail: amriazkhan@gmail.com
Pakistan
User avatar
RiazKhan
 
Posts: 97
Joined: Fri Dec 16, 2011 3:30 pm
Location: Pakistan


Return to FiveWin for Harbour/xHarbour

Who is online

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