Hi,
this is a question about popuplist selections and
hiding and showing labels and fields. Maybe a beginner's
question, but I cannot find the answer in any knowledgebase
or list archive.
What I want to do is this:
Depending on what the user has selected in TerminPlusMinusPopTrigger,
TerminAdjustField and TerminTageLabel should be invisible (if selection = 0)
or visible (if 1 or 2);
Here ist my Code:
static Boolean TerminFormHandlePopSelectEvent(EventPtr eventP)
{
FormPtr frmP;
Boolean handled;
frmP=FrmGetActiveForm();
handled = false;
[...]
if (eventP->data.popSelect.controlID = = TerminPlusMinusPopTrigger)
{
switch (eventP->data.popSelect.selection)
{
case 0:
FrmHideObject(frmP, FrmGetObjectIndex(frmP, TerminAdjustField));
FrmHideObject(frmP, FrmGetObjectIndex(frmP, TerminTageLabel));
break;
default:
FrmShowObject(frmP, FrmGetObjectIndex(frmP, TerminAdjustField));
FrmShowObject(frmP, FrmGetObjectIndex(frmP, TerminTageLabel));
break;
}
handled = true;
}
return handled;
When I return true for handled (as shown above), then the field and the
label
show properly, _but_ the label of the popuptrigger is _not_ beeing set.
When I return false for handled, then the popuptrigger is beeing set, and
the
label is visible, _but_ the field reamains invisible. It shows only if the
user selects
from the popuplist a second time.
What am I missing there?
Thanks in advance
Nikolaus Hueck
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/