Luc, >How can I dynamically reduce the number of lines of a field?
I think you want to use FldSetBounds() for this. >I tried FldSetMaxVisibleLines, Under the SDK doc's Comments section, this API seems to be a means to cap the size a dynamic field can expand to when needed (that is, the synamicSize attribute of the field is true). It does not seem to me that its purpose is to resize a field to a given number of lines. >but it requires OS 4.0 (an undocumented >requirement in the API Ref). You can always tell what OS release an API was addded by checking CoreTraps.h in the SDK headers. They are listed in trap number sequence, with comment lines between each OS release delimiter. Just open and search for the API name, and see what section it is in. But I agree that it should have been mentioned in the SDK docs too... >I tried changing the extent.y size of the >field bounds, but for that I needed to know the height of a line in the >field font, so I had to do a FntSetFont and somehow the Gremlins found a >bug with that. It seems to me that using FntSetFont followed by FntLineHeight would be the proper thing to do here. If Gremlins complained about something, I suggest you re-examine that section of code. >My next idea is to have another single-line field and >internally select the proper field. Is there a better option? If you stay with the single field paradigm, you may also want to consider changing the singleLine attribute of the field using FldGetAttributes, altering the attribute values, followed by FldSetAttributes and finally FldDrawField. Doug -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
