Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Can I Enable Mouse Wheel Scrolling With The Text Box Control?

Primary Software: LabVIEW Development Systems>>Full Development System
Primary Software Version: 1.0
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
I would like to be able to scroll through my Text Box control with the mouse wheel.  Is that feature available?

Solution:
There is not a native feature in LabVIEW to allow for mouse wheel scrolling in the Text Box control.  To use this feature, you will need to either program this capability or use the .NET RichTextBox control.

The attached example demonstrates how to build a simple scrolling mechanism to enable text box scrolling by using the mouse wheel.  This enables the LabVIEW Text Box control to be used instead of the RichTextBox .NET control.

The Aquire Input Data.vi captures the mouse wheel position and adjusts the text box scroll position based on the mouse input.  The event structure allows the scrolling to occur only when the mouse is over the text box.  It also disables scrolling if the user selects the vertical scroll bar to avoid undesirable behavior.

Related Links:
KB 36OBF83E:  How Can I Programmatically Set The Position Of My Scrollbar?

Attachments:
TextBoxScroll.vi




Report Date: 05/09/2008
Last Updated: 05/11/2008
Document ID: 4L8BBTLC

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit