[codenameone-discussions] Re: best way to add a layer (example infiniteprogress) to any component

2017-08-11 Thread Shai Almog
The container now wraps the components so you need to do:

Container cnt = LayeredLayout.encloseIn(con, progress);
con.getParent().replace(con, cnt, null);

Then to remove the infinite progress:

con.remove();
cnt.getParent().replace(cnt,con, null);

Notice the last argument can be a transition like fade, slide or something 
else if you so desire.

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/64f1a9fd-e944-4c54-a009-e7dde5f87ef4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: best way to add a layer (example infiniteprogress) to any component

2017-08-11 Thread Rocotoco Rodriguez


im doing that but the problem its that the function returns a container and 
not the original object type.  can be possible to add the getLayeredPane 
functionality to the controls who derives from Container?

think in that way, can be possible to add infiniteprogress to containers or 
labels individually  

thanks
t

> Why not just use InfiniteProgress with the code you have above instead of 
> the layer container?
>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/dc5d2b77-6a1c-4a6a-aafd-3cf7dfd80e5a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: best way to add a layer (example infiniteprogress) to any component

2017-08-10 Thread Shai Almog
Why not just use InfiniteProgress with the code you have above instead of 
the layer container?

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/ba9b9c81-7df5-4091-a2fb-873e5a5da708%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: best way to add a layer (example infiniteprogress) to any component

2017-08-10 Thread Rocotoco Rodriguez
No shai, just to the component.

it can be usefull to add and infiniteprogress when a control is loading 
asyncronously

ideas?

regards and happy hollidays



On Thursday, August 10, 2017 at 1:28:28 AM UTC-3, Shai Almog wrote:
>
> Hi,
> there are lots of ways but I'm not sure I can comment on "best" as each 
> has its uses.
> Are you adding an infinite progress to the entire form?
>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/b964b744-a3e2-4e0f-a446-d7d138593878%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[codenameone-discussions] Re: best way to add a layer (example infiniteprogress) to any component

2017-08-09 Thread Shai Almog
Hi,
there are lots of ways but I'm not sure I can comment on "best" as each has 
its uses.
Are you adding an infinite progress to the entire form?

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to codenameone-discussions+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/dd8d5859-27cb-4d5b-bfdb-0f103451d54e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.