How to make the DataWindow control unable to get focus! !

xiaoxiao2021-03-06  41

Let the DataWindow control unable to get focus! ! It is a protection against DataWindow data! Prevent illegal modification data. In addition, it can be solved after a column gets the focus, and the word will follow the phenomenon after sliding the scroll bar.

Methods as below:

Set the entire DataWindow to protected: Use the ReadOnly property of the DataWindow Object to set the entire DataWindow to a protection. The syntax is: dw_1.object.datawindow.readonly = value. Value indicates whether DataWindow is a read-only state, which has two values: True and False.

In fact, the method of making the data window cannot get the focus, such as the Tab ORDER value of a column in DataWindow can be set to 0, and the column cannot be modified by the focus.

But the first method is undoubtedly the easiest, and it can also be dynamically modified by the program, so I think it is best.

转载请注明原文地址:https://www.9cbs.com/read-57638.html

New Post(0)