RepeaterBox scrollY property is not working in Smartface - smartface.io

RepeaterBox scrollY property is not working.
Actually, I am trying to set the scroll position to 0 for repeaterBox.
Can any one help to resolve this issue.
Thanks in advance

There is no property called scrollY for repeatBox. scrollY is a property of ScrollView object.
In order to set the top position of repeatbox, you can use setTopIndex as in the
example below:
http://docs.smartface.io/html/M_SMF_UI_RepeatBox_setTopIndex.htm

this one works in my code
Pages.Page1.ScrollView1.scrollX=Device.screenWidth;

Related

UILabel.center is 0? how is that possible?

I'm trying to get the CGPoint from the center property of some UILabels (which is part of an outlet collection). Now, when i do:
for (UILabel *label in labelCollection) {
NSLog(#"%f", label.center.x);
}
It simply returns 0, same with the center.y? how come? i need those coordinates hehe :)
thanks on advance
//EDIT
Uploaded a picture: the labels with "a" "b" "c" "d" is the labels i'm talking about. i tried changing the text.property in the code and that works well, but it just wont give me the coordinates it's on.
Verify that the view has a superview. The value depends on the superview's coordinates.
I figured out the answer, it had to do with the fact that i was doing the whole thing in viewDidLoad, and i should be doing it in viewDidAppear. it must be because on viewDidLoad, it hasn't been placed yet, and therefore i could still change the text, coz the object label was created, but i couldnt get the origin coz it was not placed yet.
thanks for helping lads.
You remove the constraints then run the app may be constraint create the problem because new xcode constraints create problem on some functions and properties so first remove the constraints by uncheck the "Use autlayout "then you check the app

Why cant I display the layer property value of Uibutton

I was just experimenting with layer property of my UIButton by setting a outlet n the code for a button created in xib.
NSLog(#"d button layer value%#",dButton.layer.backgroundColor);
But the output is coming as:
d button layer value(null)
My question is: can't we display the layer property value of UIButton. We all know that some default value would have been set for the button.
According to the documentation for CALayer:
The default is nil.
unless you explicitly change it.
In the documentation for UIView, it says this:
The default value is nil, which results in a transparent background color.
This excerpt describes the view.backgroundColor property, so I assume that the view.layer.backgroundColor property is the same.
Hope this helps!
Phew !! I finally got the answer.
Actually I was trying to display the structure value using %# in NSlog statement.
dButton.layer.backgroundColor is a fundamental data type used internally by Quartz to represent colors.
So, way to display them is to make your own class which can parse the value.
Like, for example there are class functions for CGRect, CGPoint etc
like for displaying CGRect we use this code
NSLog(#"d button layer value%#",NSStringFromCGRect(dButton.layer.bounds));
but there arent any function defined for CGColorRef.
Ok, as per jrturton said,for displaying the above value we can use
NSLog(#"d button layer value%#",[UIColor colorWithCGColor:button.layer.backgroundColor)]
I hope everyone got it now !!

Implementing tree structure UITableview

Can We create tree structure in UITableView like below.
-Sub1 //First row
-Sub1sub1 //First row's child
-sub1sub1sub1 //Child's child etc..
-sub1sub1sub2
-Sun1sub2
-sub2sub2sub1
-sub2sub2sub2
-Sub2
-Sub2sub1
-sub1sub2sub1
-sub1sub1sub2
-Sun2sub2
-sub2sub2sub1
-sub2sub2sub2
Don't want any code but is there any reference for implementing this..or just let me know is it possible or not..
Please help me to solve this question..
Thanks in advance.
Finally I got my answer..
Using this Github link
Thanks Github...
TableView delegate method
tableView:indentationLevelForRowAtIndexPath:
can be used to indent rows according to your needs
I've done it before, and using this approach helped me a lot:
Implementing UITableView Tree Structure
If you need help of how to implement that solution, or if it doenst fit your problem, let us know and we will help you
Edit: I just realized you have one more level of depth that the link, but in your case you can use a header for the first level)

How to set "toggle-spacing" style property to GtkMenuItem in gtk+?

How can I set "toggle-spacing" style property to GtkMenuItem in gtk+?
I have added five GtkImageMenuItem(gtk_image_menu_item_new_with_label) to GtkMenu. Now I want to provide spacing between Image and label of this GtkImageMenuItem.
There is a style property (toggle-spacing) in GtkMenuItem to provide spacing between image and label.
How can I use this property?
I want to give alternate colors to each GtkMenuItem. How it is possible?
Kinda menu I want to create is shown in this image.
(source: flickr.com)
Thanks,
KBalar
Setting Properties.
To make the row colors alternate use gtk_tree_view_set_rules_hint.

UIView viewWithTag 0 problem

On view in IB I have numerous items (including view itself). ONLY one item has tag 0, yet following line works for ANY UITextBox other then the one with tag 0. Note that only ONE UITextBox has tag 0, why:
(UITextField *) [self.view viewWithTag:0]).text = #"foo";
Interesting that when triggered event received for the element with tag 0, I can get value of Tag 0 with no problem.
Is there a limitation to look for tag 0 elements?
All views have a 0 tag as a default so if you get a 0 view it could be any view. For it to work you need to use non-zero values that you set in your program or within Interface builder.
actually, if you ask a view called "X" for a viewwithtag 'zero', you will probably get the "X" view as the return value :/ idiotic behaviour. send regards to apple
que is right. I just got bit by this.
From the docs:
Discussion This method searches the current view and all of its
subviews for the specified view.
At least it's documented correctly. I guess we need a method called "subviewWithTag:"
set self tag as -1. won't affect other view's tag.