asterof nighthawk a écrit :
Maybe there is a better way
All I'm trying to do is display a fields data from the current record
in the field on a different form because that field is to large to have
on the first form
My app does exactly that, where each database can have an associated
comment. The comment is 255 chars, but with empty lines, you can make it
longer than a form page and the scroll bar works.
http://www.speleo.qc.ca/Auriga
I just do this:
form = FrmInitForm( yourForm );
copy text to edit (or show, in this case, do not underline field)
// if you want to be able to intervene on user's action like scrolling
FrmSetEventHandler( form, ( FormEventHandlerPtr ) yourhandler );
button = FrmDoDialog( form );
if ( button == yourFormOKButton )
// recover text from field
FrmDeleteForm( form );
in your handler
case sclRepeatEvent : // never set handled = true for scrollbars
field = ( FieldPtr ) FrmGetObjectPtrFromID( form, yourField );
if ( event->data.sclRepeat.newValue > event->data.sclRepeat.value )
FldScrollField( field, event->data.sclRepeat.newValue -
event->data.sclRepeat.value, winDown );
else
FldScrollField( field, event->data.sclRepeat.value -
event->data.sclRepeat.newValue, winUp );
break;
I set the HasScrollBar option on the field.
Good luck!
--
Luc Le Blanc
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/