daily pastebin goal
29%
SHARE
TWEET

Untitled

a guest Feb 13th, 2013 28 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Page {
  2.     objectName: "localCommentPage"
  3.     id: localCommentPage
  4.     tools: basicTools
  5.     orientationLock: PageOrientation.Automatic
  6.  
  7.     function setTextAreaSize() {
  8.         resizeTextArea()
  9.         container.contentY = 0
  10.     }
  11.     function resizeTextArea () {
  12.         commentArea.width = parent.width
  13.         commentArea.height = commentArea.text.paintedHeight
  14.     }
  15.  
  16.     Rectangle {
  17.         id: commentRec
  18.         anchors.fill: parent
  19.         color: "#9B9"
  20.         Flickable {
  21.             id: container
  22.             x: 0
  23.             y: 0
  24.             anchors.fill: parent
  25.             contentWidth: parent.width
  26.             contentHeight: Math.max(parent.height,commentArea.text.paintedHeight)
  27.             TextArea {
  28.                 id: commentArea
  29.                 anchors.fill: parent
  30.                 readOnly: true
  31.                 font.pixelSize: 32
  32.                 text: rootWindow.localCommentText
  33.                 wrapMode: TextEdit.Wrap
  34.             }
  35.         }
  36.         ScrollDecorator {
  37.             id: scrolldecorator
  38.             flickableItem: container
  39.         }
  40.     }
  41. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top