NOTE: This tutorial is outdated. Please refer to the documentation for details and usage examples.

  1. For the new button widget is it not possible to now set the defaultColor and overColor of the button itself without resorting to using images?

    You have it for the labels, why not the buttons too?

  2. Is there any way to customize the appearance and actually “theme” this widgets as you can do with native controls? I need to develop a game that relys heavily on widgets but they need to be fully customizable and I also need the Physics capabilities. Is Corona recommended for this?

  3. I followed this tutorial, and I successfully tried all the widgets with the exception of the one for the tabBar. I get an error related to a newImageRect:

    “ERROR: bad argument #2 to display.newImageRect(): filename or image sheet expected, but got nil.”

        • The widget library does this automatically based on device, however you can also override it.

          IOS theme:

          widget.setTheme( “widget_theme_ios” )

          Android theme:

          widget.setTheme( “widget_theme_android” )

      • Hi Danny,

        Today I did another try to the tabBar widget sample, and now I get a different error (Build 2013.1040)

        “ERROR: widget.newTabBar: tab button default file expected, got nil”

        Do you know of the default theme was included in this build?

        Thanks in advance
        Hector

        • I too have experienced both of these errors while setting up a simple tabBar (2.0) and while updating apps using the older version. Would love some more guidance. Does the tab Bar now require a default image?

          Hector, have you found the solution to your error yet? thanks in advance.

          • Simon/Hector/Danny,

            I am running into the same issue:
            ERROR: widget.newTabBar: tab button default file expected, got nil

            Did you gets find a solution/reason why we are seeing this?

            Greatly appreciate your input.

  4. The new scroll view seems pretty worthless for me.
    It has suddenly a required fixed scrollHeight. ScrollView is meant for simple static content only?

    For example when using the scroll view for a chat. So after a couple of messages, users can no longer scroll back.

    Further the scrollHeight is oriented from top growing to the bottom only, while in for example a chat like iMessage the scroll should be oriented from bottom growing to top.

    I hope this gets fixed soon. Thx

  5. Do you still have the checkbox and radio buttons available? Or were those removed? I really need to use those also. I have a problem using them in a scrollView and was told this owuld be fixed with widgets 2.0.

    Thanks!

    • Brent Sorrentino says:

      Hi Warren,
      The switch widgets (checkbox, radio button, switch) are definitely still available. Please refer the the “New Widgets: Part 1″ tutorial, linked from this tutorial.

  6. 1. earlier widget.newButton () is a property of ‘style’ now it’s gone?
    2. 2012.971 in the assembly was a mistake – if you add widget.newPickerWheel () in widget.newScrollView () to scroll to its maximum value. This is fixed in the new version of widget?

    thanks

  7. with the tabBar:setSelected, the second parm (simulatepressevent boolean) appears to not be working. Is this a bug or is this parm no longer available ? Thanks

  8. The documentation says that label is optional on the tab bar buttons but if you don’t specify a label you get a runtime error on newText. Does not make any sense if it’s optional.
    I want to use an image based tab bar only without spacing at the bottom for labels. Images should be centered vertically.

    I also think that if you can specify an id on each button, why can’t you read that id in the function specified in onPress?

  9. Why is it that when I add buttons to the tab bar, the buttons are not added flush to the left edge of the screen? The tab bar centers the buttons, then stacks the next button about 2/3 the way on top of the previous button.

  10. The newSlider widget seems to not work with what I wanted my sliders to look like. With the old sliders, I was able to make them 50 px tall and 150 px wide, so I could update the value indicator text inside the slider area and not have to waste space having it on the outside. I also had special looking handles to follow the theme of my app.

    Now it looks like the slider frame is limited to a certain height, like 16px? And the handle is pegged to a certain width? Probably I’m just not doing my image sheet correctly. Is it possible to have sliders with a height different from some standard height, and handles of different widths from some standard width?

    • Hey Dale,

      I’ve spent the last few hours updating to the new slider, and my limited experience would say to check and make sure you’ve specified handleFrameHeight and handleHeightWidth in your widget,newScrollView call, I’m using a 24×34 handle and it’s working fine for me.

      Also if the frames were setup incorrectly then it could also likely cause that problem. If you use SpriteSheetPacker then it outputs a handy text file that you can check the values against.

      -Treb

  11. First off, great job in getting the new widgets out. Over a long long weekend I got everything ported (for me: buttons, sliders, check/radio, and tableview). My challenge is I need to the “row.reRender” when tableView widget. My use case is upon touch I change the image I shown (essentially alternate between On/Off images). Any thoughts would be greatly appreciated.

  12. I apologize for the hideous grammar. Try 2:
    My challenge is that I need to utilize “row.reRender” which was available in the 1.0 tableView Widget library. My use case is upon touch, I change the image shown (essentially alternate between On/Off images for a given row). I thought about deleting all rows and re-adding them back in but this doesn’t seem so bright. Any thoughts on how to do this would be greatly appreciated.

    Here is the Widget 1.0 documentation: http://docs.coronalabs.com/api/library/widget/newTableView.html

  13. Is the segmentedControl really working? I have the latest daily build (1076) and I have used exactly the example you gave, but it looks strange. I am just able to select s1. If I tap s2 or s3, nothing happens, like they would be inactive.

  14. For customizing the rotation speed of a spinner the optional “time” setting seems not to work. I’ve used “incrementEvery = 80″ instead to control the spinning speed (here it will rotate every 80 milliseconds). I think “time” is used for controlling image sheet animations. More information about this can be found here: http://www.coronalabs.com/blog/2013/07/16/tutorial-stylizing-widgets-part-1/

    Please note: I couldn’t find this information in the api… is it an actual version or did I miss something here?

  15. does the id for newSlider widget work? Even if i don’t put a value to the id in the widget options the event.id always returns nil. But the event.value returns the correct value.

    • Hi Jacques,
      Which build of Corona are you using? I just tested with #2100, and the id property is working as expected.

      Brent

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>