我的 LabWindows/CVI Command Button 在改變 Label Text 後,其大小就自動改變(resize)了。



主要軟體: LabWindows/CVI Development Systems
主要軟體版本: 8.1.1
主要軟體修正版本:
次要軟體: LabWindows/CVI Development Systems>>Base Package

問題: 如果我用程式改變 command button 的 label,其大小就自動改變了。我該如何不讓這個情形發生?

解答: Command Button 控制元中有ㄧ個屬性(Attribute)是 Auto Sizing。這個屬性定義了,當使用程式的方式來改變其文字時,這個按鈕是否要自動改變大小。以下是這個屬性的值:

VAL_ALWAYS_AUTO_SIZE Command button is always resized to fit its text.
VAL_GROW_ONLY Command button is resized when the text does not fit in the button.
VAL_SHRINK_ONLY Command button is resized when the text is smaller than the button.
VAL_NEVER_AUTO_SIZE Command button is never resized.


這個控制元屬性的預設值為 VAL_GROW_ONLY。你可以將值設為 VAL_NEVER_AUTO_SIZE 以確保你的command button不會在改變 label 後自動改變大小。

請參考 LabWindows/CVI Help 以得到這個屬性的更多資訊。

相關連結: LabWindows/CVI

附加檔案:





報告日期: 09/09/1996
最後更新: 08/09/2007
文件偏號: 0P8F5R52