could be a re-drawing issue.  Instead of having 2 buttons, you could have
one button, and then change its caption. Similarly in the code you could
either maintain its state information, or strcmp the labels each time to see
which mode you're in.


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Su
Sent: Wednesday, February 14, 2001 9:34 PM
To: Palm Developer Forum
Subject: RE: Dynamic UI


Hello...

I was trying my Hand on something like this.... I have
a 'Draw' button. When pressed, the related action
occurs and  this button disappears and an Erase button
sprouts in.... similarly when this erase button is
pressed same things happen  and it's hidden and the
Draw button come in. But then theres something very
funny.... If I simply press the buttons, the buttons
disappear and appear properly. But the problem is,
when I press the 'Draw' button and do some action on
the form and then I press the button, the 'Draw'
button doesnt disapppear from my Form. But yes, the
action is transferred and inspite of the Draw button
in the form, the work is done of the erase button.
..........
FrmHideObject (frmP, FrmGetObjectIndex (frmP, 1203)) ;
CtlHideControl(GetObjectPtr(NewDrawButton));
FrmShowObject (frmP, FrmGetObjectIndex (frmP, 1202)) ;
CtlShowControl (GetObjectPtr(NewEraseButton));
.......

So anybody can help me on this....

Thanx
Su


--- Steve Austin <[EMAIL PROTECTED]> wrote:
> I create buttons dynamicly in a program I'm writing,
> and it works ok.  Make
> sure you give them an ID and then refer to this ID
> when trying to catch
> their ctlselect events.
>
> On a side note, does anyone know how to hide a
> dynamicly created bitmap in
> OS3.01 ?  I found documentation saying that you had
> to set the usable
> attribute by hand, but when I do so, I get a crash.
>
> Thanks
>
> Steve
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
>
[mailto:[EMAIL PROTECTED]]On
> Behalf Of Mark
> Hamann
> Sent: Tuesday, February 13, 2001 4:28 PM
> To: Palm Developer Forum
> Subject: Dynamic UI
>
>
> I am trying to create forms at run-time from a very
> large set of data that
> will change fairly often.  I want to keep all of my
> information in large
> tables, and then create screens from the data in the
> tables.
>
> I am using FrmNewForm and CtlNewControl to make a
> form and put buttons on
> it, but I can't seem to generate ctlSelectEvent
> events.  It's like the
> buttons aren't even there.  I'm doing CtlSetEnabled
> and CtlSetUsable.
>
> Any idea what I'm doing wrong.
>
> Also, any idea what this cryptic line in the Dynamic
> UI section of the
> Companion Guide means? "You cannot create buttons
> (or repeating buttons)
> having frames or non-bold frames."
>
> Thanks
> Mark Hamann
>
>
>
>
> --
> For information on using the Palm Developer Forums,
> or to unsubscribe,
> please see
> http://www.palmos.com/dev/tech/support/forums/
>
>
> --
> For information on using the Palm Developer Forums,
> or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year!  http://personal.mail.yahoo.com/

--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to