That sounds simple enough in that I would think you just check the
autosize height on the column and detail band and verify that the auto
horz scroll property is not checked for the column and everything
should work. That is not the case. If I do this when I try to enter
data I'm limited to entering the amount of text that fits in the
column w/o scrolling. That is, it doesn't word wrap like you would
expect it too. PB documentation indicates that you shouldn't use
autosize height for data entry fields. So my questions are how do you
handle this type of problem?
I've tried setting the height myself using an expression. That works
fine (but requires the use of courier new for a font) for retrieving
data and displaying it properly but it doesn't work for entry for the
same reason as the autosize height solution doesn't work in that the
field doesn't wrap text as you type into it.
I'm using PB 10.5.1
Any ideas are appreciated.
TIA, Derek
--
Paul Horan[Sybase]
http://blogs.sybase.com/phoran/
"Derek" <dro...@mayo.edu> wrote in message
news:63936638-cb41-4f06...@c29g2000yqd.googlegroups.com...
The field holds up to 80 characters but only about 20 display so they
complain quite a bit when they can't see the information.
I'm going to try to see if I can dynamically turn on/off the vertical
scrollbar and set the height as they are typing. Not sure if that's
going to work but that's the next thing I'm going to try.
Thanks, Derek
I can think of a couple of approaches.
- Write code in the EditChanged event to check the Len() of the data, then
Modify() the column height when you exceed a specified value. (Calculating
that value will be the hard part).
- Popup a MLE control over the top of the column, simulating the edit
control, and make that large enough to contain the entire text string. Then
do a SetItem() back into the column when that control loses focus.
--
Paul Horan[Sybase]
http://blogs.sybase.com/phoran/
"Derek" <dro...@mayo.edu> wrote in message
news:69f62d30-2115-4a10...@v36g2000yqv.googlegroups.com...
I've got the edit changed logic working sort of. A couple problems
with it. When I set the height based on what is happening in the
current row, the height for all the rows change. I think I can get
around that by checking for maximum height and never setting a height
that is smaller than the tallest one. This looks a little clunky but
at least it allows for data entry. Also, when I come out of edit
changed, the focus was going to row one no matter which row I was
editing. I added code to set focus back on row/column I was typing in
but now it places me at the beginning of that column. Do you know how
to set the cursor to the end of the data that I'm currently editing?
My edit changed code looks like this.
IF dwo.name = 'procedure_note' THEN
CHOOSE CASE len(data)
CASE IS < 20
this.object.procedure_note.Height = 64
this.SetRow(row)
CASE 21 TO 40
this.object.procedure_note.Height = 128
this.SetRow(row)
CASE 41 TO 60
this.object.procedure_note.Height = 192
this.SetRow(row)
CASE 61 TO 80
this.object.procedure_note.Height = 256
this.SetRow(row)
CASE ELSE
this.object.procedure_note.Height = 64
this.SetRow(row)
END CHOOSE
END IF
Without the SetRow(row) command focus was going back to the first
row. Now it goes to the correct row but places the focus at the
beginning of the text so when you type it makes it look like you're
typing backwards.
I appreciate the help you've provided so far.
Thanks, Derek