New Candy Lib: Widget Candy for Corona

Super. Thanks for sharing. Best of luck with your project.

Did anybody ever find a solution for a scrolling multiline text Widget that can be used in a Window?

Quick question (apologies if it’s been answered).

Is some of the documentation incomplete? Is there an updated version somewhere that I’m missing?

I’m using this for example:

http://www.x-pressive.com/WidgetCandy_Corona/reference.html#WG1

And I want to set the title for my window… it doesn’t seem to be a Property?

I took a few guesses and managed to set “caption”, but it’s left-aligned. So now I’m wondering if there’s caption alignment properties?

Not sure if I’m missing something, or the documentation is.

EDIT: All good - found the answer in some code further up on this page. Where do those additional properties come from though - i.e. where are they documented? textAlign = “center”

Automated Widget Layout  
Widget Candy comes with a powerful, automated layout system to arrange your widgets automatically inside a window widget, for example. There is no need to fiddle with widget coordinates, Widget Candy will do this for you. Each widget’s position, as well as it’s width and height, can be set to percentage values (which are either referring to the screen size or a parent window’s size). Additionally, automatic widget alignment allows you to use “left”, “center” or “right” as a widget’s x-position, for example to automatically place it on the left or right border of the screen (or a parent window) or to center it for you. You even don’t need to specify any coords at all for your widgets, simply place them inside a window widget and let Widget Candy layout them automatically for you. Layouting an interface has never been easier! 

How does this work exactly? Does it happen automatically, or is it something that needs to be turned on?

I create a window. The an input field (just setting x to center, no y value), then another input field (again just setting x to center). When I run this, it places one on top of the other. I assumed this auto layout of items added to the window would automatically place one after the other in the order that they’re created. Is that not how it works?

Search http://x-pressive.com/WidgetCandy_Corona/reference.html#C0 for AUTOMATED WIDGET LAYOUT detailed answers exist on that page for all your questions. I feel responsible since I pushed you to WC from the other forum :slight_smile: But the documentation on this page is very comprehensive you could definitely find all you need by reading there. 

Okay - got things working now. Don’t worry - I’m already loving this Widget Candy thing :)  Definitely a lot happier now with the results that I’m getting.

Any thoughts on how to easily add scrolling to a Window is its content exceeds its size?

The Widget Candy demo is quite useful to figure out things like this. The following is from main.lua where the list of demo items scroll is listed : 

_G.GUI.NewList(

    {

    x                 = “center”,               

    y                 = “center”,               

    width             = “80%”,                  

    height            = “90%”,          

    scale             = _G.GUIScale,

    parentGroup       = nil,                    

    theme             = “theme_1”,              

    name              = “LST_MAIN”,             

    caption           = “WIDGET CANDY SAMPLES:”,   

    list              = ListData,               

    allowDelete       = false, 

    readyCaption      = “Quit Editing”,   

    scrollbar         = “onScroll”,

    border            = {“shadow”, 8,8, 64},

    onSelect          = function(EventData) _G.LoadSample(EventData) end,

    } )

    scrollbar         = “onScroll”,          - should be what you need. Hope this helps.

That’s for scrolling a List though, right? Where that behaviour is built-in.

What I wanted to do is create a Window full of controls (using auto-layout) and have a scrollbar to get to the controls that are “below” the bottom edge of the Window.

You are right. I’m sorry for misunderstanding your question. Don’t have an answer but I’m sure its possible. 

No - all good. I could have done better than a single sentence to explain myself :slight_smile:

So yeah - I’m thinking something like a UIScrollView, so the Window automatically adds scrollbars if its contents exceeds what can currently be displayed. For example, you have a 300x300 Window with 50 buttons in it, one on top of the other, so maybe only 3 or 4 can be seen at any given time.

Maybe it’s something the Widget Candy creators might add at some point… nudge, nudge.

Suggest you send a note in to them. I have found them very responsive on email. Not sure if they spend much time on this forum. All the best. 

Done! Hopefully a future feature.

If it turns out it can be done currently, I’ll post back.

Super. Thanks for sharing. Best of luck with your project.

Did anybody ever find a solution for a scrolling multiline text Widget that can be used in a Window?

We currently have all the Candy products and are in need of a scrolling multiline text box as well. Is there such a capability in widget candy? Please respond as soon as possible as we are holding our latest app up pending a decision to use native text boxes or Candy.

Thanks in advance!

for input that is…

We currently have all the Candy products and are in need of a scrolling multiline text box as well. Is there such a capability in widget candy? Please respond as soon as possible as we are holding our latest app up pending a decision to use native text boxes or Candy.

Thanks in advance!

for input that is…

Does anybody have problems with sluggish keyboard input to the widget candy text field. My text input lags so badly that I cannot use it. If I type fast only about 50% of the “keystrokes” are actually registered.

At first I got good support from X-pressive, but suddenly they stopped answering my mails altogether…  :frowning:

I have now tried to reach them about 4-5 times over a period of 2-3 weeks, but have got no response (that was over a month ago).