focus button in one group scroll
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: focus button in one group scroll
The group must be smaller than its contents or there is nothing to scroll. But more imporant, I don't see any commands in your scrollerDidScroll handler to set the vScroll of the group. You need to add that.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: focus button in one group scroll
Hi Jacque,
I will see for the width of my group...
I have one question...Do i have to control the VScroll in my handler, even if what i want to do is to scroll in horizontal?
Because when i made my handler for the scroll in another card, and was to scroll in vertical, i didn't need to control the HScroll...
Regards.
fko
I will see for the width of my group...
I have one question...Do i have to control the VScroll in my handler, even if what i want to do is to scroll in horizontal?
Because when i made my handler for the scroll in another card, and was to scroll in vertical, i didn't need to control the HScroll...
Regards.
fko
Re: focus button in one group scroll
You only need to control the directions the app should respond to. That can be only one direction, or both directions.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: focus button in one group scroll
Hi Jacque,
Ok, so if i understood well, i can only control the HScroll, because in this card i need only the horizontal scroll...
So, i will change the width of the group and try to see if my code is working!
Regards.
fko
Ok, so if i understood well, i can only control the HScroll, because in this card i need only the horizontal scroll...
So, i will change the width of the group and try to see if my code is working!
Regards.
fko
Re: focus button in one group scroll
It is me again
So, i changed the width of group...In place of 1759 ( this value was given automatically when i created the group), i made one width of 1024...
the rect of my last element is still: "1549,475,1769,635"
But with my code i posted some days ago, is not working...
So now if i am not wrong, the width of my group is smaller than the content of the elements of the group.
The code it seems correct but anyway is not working the horizontal scroll.
Really i don't know how to advance...
This is my code for the vertical scroll, that is working in another card i have...
The width of "MyGroup" 698 and the height is 3702 ( this height was given automatically when i made the 'group selected')
and the rect of the last element in this group is "794,3827,856,3867"
So any correction or modification of this code that is working for one vertical scroll, to make it work for one horizontal scroll???? I feel desperate as i can't see the error i am making...
Regards.
fko
So, i changed the width of group...In place of 1759 ( this value was given automatically when i created the group), i made one width of 1024...
the rect of my last element is still: "1549,475,1769,635"
But with my code i posted some days ago, is not working...
So now if i am not wrong, the width of my group is smaller than the content of the elements of the group.
The code it seems correct but anyway is not working the horizontal scroll.
Really i don't know how to advance...
This is my code for the vertical scroll, that is working in another card i have...
Code: Select all
local theScrollerID
on preopenCard
set the unboundedVScroll of group "MyGroup" to true
end preopenCard
on openCard
if the environment is "mobile" then
mobileControlCreate "scroller", "groupScroller1"
put the result into theScrollerID
put the topLeft of group "MyGroup" into tRect
put the right of group "MyGroup" into item 3 of tRect
put the height of this card into item 4 of tRect
put the formattedWidth of group "MyGroup" into tWidth
put the formattedHeight of group "MyGroup" into tHeight
mobileControlSet theScrollerID,"rect", tRect
mobileControlSet theScrollerID, "contentRect", (0,0,tWidth,tHeight)
mobileControlSet theScrollerID, "visible", "true"
iphoneControlSet theScrollerID, "canBounce", "true"
iphoneControlSet theScrollerID, "scrollingEnabled", "true"
iphoneControlSet theScrollerID, "canScrollToTop", "true"
iphoneControlSet theScrollerID, "lockDirection", "true"
iphoneControlSet theScrollerID, "decelerationRate", "normal"
iphoneControlSet theScrollerID, "pagingEnabled", "false"
iphoneControlSet theScrollerID, "indicatorStyle", "black"
iphoneControlSet theScrollerID, "vIndicator", "true"
iphoneControlSet theScrollerID, "delayTouches", "true"
iphoneControlSet theScrollerID, "canCancelTouches", "true"
iphoneControlSet theScrollerID, "hscroll", 0
iphoneControlSet theScrollerID, "vscroll", 0
focus on btn "btnMenu1"
end if
end openCard
on scrollerDidScroll pHScroll, pVScroll
set the vScroll of group "MyGroup" to pVScroll
end scrollerDidScroll
on closeCard
if environment() = "mobile" then
mobileControlDelete "groupScroller1"
end if
end closeCard
The width of "MyGroup" 698 and the height is 3702 ( this height was given automatically when i made the 'group selected')
and the rect of the last element in this group is "794,3827,856,3867"
So any correction or modification of this code that is working for one vertical scroll, to make it work for one horizontal scroll???? I feel desperate as i can't see the error i am making...

Regards.
fko
Re: focus button in one group scroll
Code: Select all
on scrollerDidScroll pHScroll, pVScroll
set the vScroll of group "MyGroup" to pVScroll
end scrollerDidScroll
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: focus button in one group scroll
Also look at the setup in the opencard handler, which sets a vertical scrollbar but no horizontal one.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: focus button in one group scroll
Hi,
I think i didn't express myself well...
this last code is what i am using for one card where i am using one vertical scroll...
So, it is for this that i have nothing in the handlers controlling the horizontal scroll!
So, my question is what should i change in my code, that is working for one vertical scroll, to make it work only for one horizontal scroll in the new i card.
In the code i posted some days ago, i already changed some things as
and,
and the next line in the openCard
But even with these changes, is not working the horizontal scrolling...
So, i don't know if i understood you well what are you telling me, or there is somethings more that i am not seeing and / or understanding...
I thought it was quite simple pass from one vertical scroll to one horizontal one, but i am blocked here for some days and i begin to feel impotent...
If you see something more, than what i changed above, in the code that i should change tell me please!
Regards.
fko
I think i didn't express myself well...

this last code is what i am using for one card where i am using one vertical scroll...
So, it is for this that i have nothing in the handlers controlling the horizontal scroll!

So, my question is what should i change in my code, that is working for one vertical scroll, to make it work only for one horizontal scroll in the new i card.
In the code i posted some days ago, i already changed some things as
Code: Select all
on scrollerDidScroll pHScroll, pVScroll
set the hScroll of group "MyGroup" to pHScroll
-- I HAD THIS BEFORE set the vScroll of group "MyGroup" to pVScroll
end scrollerDidScroll
Code: Select all
on preopenCard
set the unboundedHScroll of group "MyGroup" to true
-- I HAD THIS BEFORE set the unboundedVScroll of group "MyGroup" to true
end preopenCard
Code: Select all
on openCard
iphoneControlSet theScrollerID, "hIndicator", "true"
-- I HAD THIS BEFORE iphoneControlSet theScrollerID, "vIndicator", "true"
end openCard

So, i don't know if i understood you well what are you telling me, or there is somethings more that i am not seeing and / or understanding...

I thought it was quite simple pass from one vertical scroll to one horizontal one, but i am blocked here for some days and i begin to feel impotent...

If you see something more, than what i changed above, in the code that i should change tell me please!

Regards.
fko
Re: focus button in one group scroll
Any idea or any little example for one horizontal scrolling??? I feel blocked with this scrolling...
Thanks in advance!
regards.
fko
Thanks in advance!

regards.
fko
Re: focus button in one group scroll
Hi fko,
are you sure the formattedWidth of your group is larger than the width of your group?
If not nothing is going to scroll because there is no need to scroll.
could you post the current script you use to do the horizontal scrolling and indicate the width of the group and the formattedWidth of the group?
Kind regards
Bernd
are you sure the formattedWidth of your group is larger than the width of your group?
If not nothing is going to scroll because there is no need to scroll.
could you post the current script you use to do the horizontal scrolling and indicate the width of the group and the formattedWidth of the group?
Kind regards
Bernd
Re: focus button in one group scroll
Attached an example of horizontal scrolling... mmm... old stack, but have just run it again and it is a little 'grumpy' in the simulator but runs fine on an iphone...

- Attachments
-
- horzscroll.zip
- (90.93 KiB) Downloaded 223 times
Re: focus button in one group scroll
Hi Bernd,
this is my code for the horizontal scrolling:
the width and the formattedWidth are 1759 in both...So, the problem is here!!! I was turning crazy!!! 
It is working now!!! So thanks to Jacque, Bernd and Dixie for your help!!!
I have another conceptual problem, but i will open another topic to ask this, now!!!
Regards.
fko
this is my code for the horizontal scrolling:
Code: Select all
local sScrollerIDWeek
on preopenCard
set the unboundedHScroll of group "grpWeek" to true
end preopenCard
on openCard
if the environment is "mobile" then
mobileControlCreate "scroller", "groupScroller3"
put the result into sScrollerIDWeek
put the topLeft of group "grpWeek" into tRect
put the right of group "grpWeek" into item 3 of tRect
put the height of this card into item 4 of tRect
put the formattedWidth of group "grpWeek" into tWidth
put the formattedHeight of group "grpWeek" into tHeight
mobileControlSet sScrollerIDWeek,"rect", tRect
mobileControlSet sScrollerIDWeek, "contentRect", (0,0,tWidth,tHeight)
mobileControlSet sScrollerIDWeek, "visible", "true"
iphoneControlSet sScrollerIDWeek, "canBounce", "true"
iphoneControlSet sScrollerIDWeek, "scrollingEnabled", "true"
iphoneControlSet sScrollerIDWeek, "canScrollToTop", "false"
iphoneControlSet sScrollerIDWeek, "lockDirection", "true"
iphoneControlSet sScrollerIDWeek, "decelerationRate", "normal"
iphoneControlSet sScrollerIDWeek, "pagingEnabled", "false"
iphoneControlSet sScrollerIDWeek, "indicatorStyle", "black"
iphoneControlSet sScrollerIDWeek, "hIndicator", "true"
iphoneControlSet sScrollerIDWeek, "delayTouches", "true"
iphoneControlSet sScrollerIDWeek, "canCancelTouches", "true"
iphoneControlSet sScrollerIDWeek, "hscroll", 0
iphoneControlSet sScrollerIDWeek, "vscroll", 0
end if
end openCard
on scrollerDidScroll pHScroll, pVScroll
set the hScroll of group "grpWeek" to pHScroll
end scrollerDidScroll

It is working now!!! So thanks to Jacque, Bernd and Dixie for your help!!!

I have another conceptual problem, but i will open another topic to ask this, now!!!

Regards.
fko
avoid button deformation
Hi,
The app i am doing, it is running in my iPad where the orientation is landscape, as i really imagined it...
But when it turns to portrait, the buttons are deformed...
I imagine that yes, but i am not able to imagine how should i do this.
In my openStack i have this line:
but even when i changed with the other options of the fullScreenMode i have the same problem.
So, how to have the same pretty look of my button in both orientations??? In my case i have one button of 50 x 50 and one image of 50x50 for this button too...
So what should i do to preserve 'round' of this button and image when i change the orientation to portrait?
thanks for your advices / councils or ideas!
Regards.
fko
The app i am doing, it is running in my iPad where the orientation is landscape, as i really imagined it...
But when it turns to portrait, the buttons are deformed...
I imagine that yes, but i am not able to imagine how should i do this.
In my openStack i have this line:
Code: Select all
set the fullScreenMode of this stack to "exactFit"
So, how to have the same pretty look of my button in both orientations??? In my case i have one button of 50 x 50 and one image of 50x50 for this button too...
So what should i do to preserve 'round' of this button and image when i change the orientation to portrait?
thanks for your advices / councils or ideas!
Regards.
fko
Re: focus button in one group scroll
Sorry for the moderators!!! 
I thought i was writing in one new topic...I Just saw that not, when i pressed submit!
So, i already created the new topic...
If you want to delete it from the reply here it is ok...
Regards,
fko

I thought i was writing in one new topic...I Just saw that not, when i pressed submit!
So, i already created the new topic...
If you want to delete it from the reply here it is ok...

Regards,
fko