req: allow leftAnchor, width in popup

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

req: allow leftAnchor, width in popup

David McNab
Hi Marcio,

This is a much gentler request.

Would you be willing to amend the ui.popup() call from:

   ui.popup(t [,sel])

to

   ui.popup(t [,sel [,width [,leftAnchor]]])

I can simulate leftAnchor by handling popup events, calculating the
size of the selected string, then marking the popup for a redraw, but
this causes unnecessary redraws.

The proposed extension would be backward compatible, so should have
zero impact on existing Plua apps.

Would be much appreciated if you can do it

Cheers
David






 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply | Threaded
Open this post in threaded view
|

Re: req: allow leftAnchor, width in popup

migueletto
Hi,

> Would you be willing to amend the ui.popup() call from:
>
>    ui.popup(t [,sel])
>
> to
>
>    ui.popup(t [,sel [,width [,leftAnchor]]])
>
> I can simulate leftAnchor by handling popup events, calculating the
> size of the selected string, then marking the popup for a redraw, but
> this causes unnecessary redraws.

A popup is composed of two PalmOS UI controls. The list and the
trigger. In PalmOS the leftAnchor flag is not available for lists,
only for other controls like the trigger. In the current implemtation,
a ui.popup call creates the trigger with leftAnchor set (it is the
last parameter to the CtlNewControl call). What you mean by simulating
leftAnchor ?

Regards,
Marcio.






 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply | Threaded
Open this post in threaded view
|

Re: req: allow leftAnchor, width in popup

David McNab
--- In [hidden email], "migueletto" <mmand@...> wrote:
> > I can simulate leftAnchor by handling popup events, calculating the
> > size of the selected string, then marking the popup for a redraw, but
> > this causes unnecessary redraws.

> A popup is composed of two PalmOS UI controls. The list and the
> trigger. In PalmOS the leftAnchor flag is not available for lists,
> only for other controls like the trigger. In the current implemtation,
> a ui.popup call creates the trigger with leftAnchor set (it is the
> last parameter to the CtlNewControl call).

> What you mean by simulating leftAnchor ?

In my OPlua framework, I've done just that. A 'rightJustify' attribute
causes the popup control to be dynamically x-positioned according to
the length of the currently selected list item. The visual effect is
like the 'categories' popup at the top-right of the PalmOS main
launcher app form - the right edge does not move.

However, this necessitates a full screen redraw whenever a different
item is selected - no problem if I'm using a MultiPagePopup window
(refer OPlua manual), because the screen needs to be redrawn anyway.
But from a Plua API point of view, it would be nice if users had the
choice to have the popup right-justified within the Plua implementation.

Cheers
David






 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/plua/

<*> To unsubscribe from this group, send an email to:
    [hidden email]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/