Author Topic: Stupid little question  (Read 4794 times)

jeffpk

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
Stupid little question
« on: March 12, 2014, 04:27:59 PM »
Im building an in game script editor.  Im using a UILabel in a scrollview and it works pretty well.

One thing though, the horizontal and vertical scroll bar controls pull in the opposite way you would expect in an editor.  They pull the text rather then the viewport on the text.

Is there an easy way to reverse these controls?

jeffpk

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
Re: Stupid little question
« Reply #1 on: March 12, 2014, 04:45:39 PM »
NM, found it.

"Direction"

jeffpk

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
Re: Stupid little question
« Reply #2 on: March 12, 2014, 04:50:06 PM »
Hmm still not right.

It scrolls the text panel out of the scroll view rather then panning across the text panel :(

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Stupid little question
« Reply #3 on: March 12, 2014, 09:28:05 PM »
What do you mean? Scroll bars have the Direction field which lets you change which way they go. What do you mean by "scrolls the text panel out of the scroll view"?

jeffpk

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
Re: Stupid little question
« Reply #4 on: March 12, 2014, 11:42:09 PM »
I mean I have my label "homed" at the top left corner, which is correct for typing in text

BUT when I scroll the label in the scroll view using the scroll bars, the label moves down and to the right.  What I want is for it to move up and to the left.

Does that make sense or should I draw a diagram?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Stupid little question
« Reply #5 on: March 14, 2014, 12:00:13 PM »
Some pics may help. Scroll views have an Origin point that controls where all content originates. It's top-left by default for newly created scroll views, meaning the content's top-left corner aligns with the scroll view area's top-left corner.

jeffpk

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
Re: Stupid little question
« Reply #6 on: March 14, 2014, 06:17:15 PM »
See the attached image explanation:


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Stupid little question
« Reply #7 on: March 14, 2014, 08:36:16 PM »
Scroll view uses the bounds of all the children to determine the scrollable area. You can see these bounds as an orange outline. Scroll bars go from top-left corner of the orange box to the bottom-right.

jeffpk

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 28
    • View Profile
Re: Stupid little question
« Reply #8 on: March 17, 2014, 10:42:34 PM »
Okay Ill check them out.  Thanks.