Text selection in columns of EwTableList (WindowBuilderPro)

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

Text selection in columns of EwTableList (WindowBuilderPro)

Postby gsharma84 » Mon Dec 21, 2009 8:27 pm

hi,
I'm using windowbuilder pro and va smalltalk 7.5.2, i have a EwTableList and want to select specific text in the columns.
Eg: like when we do search, the text appears selected that is found, I want to make this work in this table as my records are displayed in a table.
Please help, I'm unable to find hw can i select text in a particular cell.
thanks
gsharma84
 
Posts: 16
Joined: Mon Dec 21, 2009 8:20 pm

Re: Text selection in columns of EwTableList (WindowBuilderPro)

Postby tc » Tue Dec 22, 2009 11:18 am

Hello,

I used EwxTableListExample as an example. When searching for text, one would have to find the cell where the text is, then use 'EwTableList>>#selectCell:notify:' to select the cell with notify set to true.

When the cell is selected, a callback is made if you defined one. The callData parameter of the callback has an editPolicy. That can be used to select text. I modified the method 'EwxTableListExample>>#beginEditString:clientData:callData:' to always select the first four letters in a cell:
Code: Select all
beginEditString: widget clientData:clientData callData:callData
   "A cell in the widget is about to be edited. This method handles
   the callback for cell values that are strings"

   callData doit: true.
   callData editPolicy selection: 0@4

--tc
tc
Moderator
 
Posts: 304
Joined: Tue Oct 17, 2006 7:40 am
Location: Raleigh, NC


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest