翻譯|使用教程|編輯:鮑佳佳|2020-09-03 13:51:21.503|閱讀 276 次
概述:通過代碼調(diào)整窗格的大小,必須使用SetSize方法將最大和最小窗格寬度設(shè)置為相同的大小。將最小寬度和最大寬度設(shè)置為相同大小會(huì)導(dǎo)致窗格被調(diào)整為指定的設(shè)置大小,但是也會(huì)“鎖定”窗格,因此無法調(diào)整大小。
# 界面/圖表報(bào)表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關(guān)鏈接:
Xtreme Toolkit Pro是MFC開發(fā)中最全面界面控件套包,它提供了Windows開發(fā)所需要的11種主流的Visual C++ MFC控件,包括Command Bars、Controls、Chart Pro、Calendar、Docking Pane、Property Grid、Report Control、Shortcut Bar、Syntax Edit、Skin Framework 和Task Panel。如果對(duì)產(chǎn)品感興趣的話歡迎下載Xtreme Toolkit Pro最新試用版!
【同類產(chǎn)品推薦】
若要通過代碼調(diào)整窗格的大小,必須使用SetSize方法將最大和最小窗格寬度設(shè)置為相同的大小。將最小寬度和最大寬度設(shè)置為相同大小會(huì)導(dǎo)致窗格被調(diào)整為指定的設(shè)置大小,但是也會(huì)“鎖定”窗格,因此無法調(diào)整大小。
若要允許調(diào)整窗格的大小,必須調(diào)用NormalizeSplitters方法,然后可以再次使用SetSize設(shè)置可以調(diào)整窗格的最小和最大寬度。這次不會(huì)調(diào)整窗格的大小,因?yàn)樵谠O(shè)置寬度和高度之前已調(diào)用NormalizeSplitters。
Dim A As Pane 'Add a pane that is 50x50 Set A = DockingPaneManager.CreatePane(1, 50, 50, DockLeftOf) A.Title = "Pane A" 'Only needs to be called if setting the size in Form_Load DockingPaneManager.RecalcLayout 'setting the minimum and maximum track size to the same size 'will resize the pane to the specified width\height and lock 'the pane to the specified size. ' 'Below, the pane will be resized to 100x100 and can not be 'resized DockingPaneManager.FindPane(1).MinTrackSize.SetSize 100, 100 DockingPaneManager.FindPane(1).MaxTrackSize.SetSize 100, 100 'Only needs to be called if setting the size in Form_Load DockingPaneManager.RecalcLayout 'NOTE: 'If the pane is docked to the Left\Right, then the "Width" will 'be used, if docked to the Top\Bottom, then the "Height" 'specified will be used. The only time both width and height 'are used to size a pane is when the pane is floating. 'Remembers previous pane size settings so that the next call 'to SetSize will not resize the pane DockingPaneManager.NormalizeSplitters 'sets the minimum and maximum sizes the splitter can move 'Note, this will not resize the pane since NormalizeSplitters 'was called before the call to SetSize. Now SetSize will 'only specify how large/small the user can resize the pane. 'Below, the pane can be resized between 0x0 and 500x500. DockingPaneManager.FindPane(1).MinTrackSize.SetSize 0, 0 DockingPaneManager.FindPane(1).MaxTrackSize.SetSize 500, 500
今天的內(nèi)容就是這些了,下載最新版Xtreme ToolKit Pro并在下方評(píng)論區(qū)分享您對(duì)該產(chǎn)品的想法。您的反饋意見可幫助我們?cè)谝院蟮母轮姓业秸_的方向,慧都作為Codejock的正版代理商現(xiàn)Xtreme ToolKit Pro正版授權(quán)最高立減2000元!
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請(qǐng)務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請(qǐng)郵件反饋至chenjj@fc6vip.cn
文章轉(zhuǎn)載自: