0

how to get scrollbar over textbox while adding text at the code level

asked 2014-02-27 11:18:36 +0800

ZKDeveloper01 gravatar image ZKDeveloper01
1 1

Hi all,

I have a used a textbox in a ZUL file, but I am populating data in this textbox in the java code where I read a Text file and write data from the file to the textbox.

Bow problem is, even if file data exceed the row limit I have provided for the textbox textbox do not provide scrollbar to view complete data.

If I make this textbox editable and add some data manually in it, it will show scroll bar after row limit exceeds.

Now, can anyone tell me how I get scrollbar without editing textbox manually for the static file data I have inserted using java code.

Thanks, Sagar

delete flag offensive retag edit

1 Answer

Sort by » oldest newest most voted
0

answered 2014-02-28 06:59:36 +0800

MVarun gravatar image MVarun flag of India
268 1 6

Hi Sagar,

Try this in your java code...

textbox.setMultiline("true");
textbox.setRows(8); // change number as per your need
textbox.setStyle("overflow:auto");

Greetings..

M Varun.

link publish delete flag offensive edit

Comments

and don't forget textbox.invalidate(); :)

chillworld ( 2014-02-28 07:48:07 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-02-27 11:18:36 +0800

Seen: 11 times

Last updated: Feb 28 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More