Layne Lund wrote:
I am quite new to Palm development and would like someone's opinion on
the UI controls I should use in the project I am working on. First an
explanation of what I need to do:
The main form needs to have three columns:
1) allows user to enter a number (possibly with decimal places)
2) allows the user to select a value from a list of choices
3) displays the number in item 1 divided by 4 (this text is not editable)
The user should be able to add runtime probably by clicking a button.
My original idea was to use a table for this. I still need to look
into the API functions for the Table control to see how difficult it
is to dynamically add and remove rows. I just read recently that
Table does not allow you to edit numbers. I take this to mean that an
editable field in a Table column doesn't do any data validation to
make sure the user only enters digits.
I guess I could roll my own code to do this validation, but would it
be easier to use Field and PopupTrigger controls instead and
dynamically allocate them? Is it even possible to dynamically create
controls and add them to a form at runtime? This is essentially the
crux of my question.
Thanks in advance for your help.
Layne
I can say that tables are the most complex part in Palm Programming.
As a newbie you should be very careful at programming this.
So much to the warning, what you describe is best done with a table,
but you have to be careful, for every editable row you have to allocate
MemHandles and free them after the use.
I had to do something similar a year ago. The tutorials won't help you
much, but you can take a look at the ToDo example in your IDE.
As far as I know it's not possible to create controls in runtime, but I
may be mistaking there.
Christian
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/