Resize IDE Splitter Panel?
Resize IDE Splitter Panel?
Hi, does anyone know how to remotely change the width of the IDE tool panel?
- RSBasic
- Moderator
- Posts: 1218
- Joined: Thu Dec 31, 2009 11:05 pm
- Location: Gernsbach (Germany)
- Contact:
Re: Resize IDE Splitter Panel?
Method 1: You can edit the preference file "PureBasic.prefs": ToolsPanel\Width
Method 2: There is no direct WinAPI function for PureSplitter because PureSplitter is a own control/gadget of PB but here a workaround:
Method 2: There is no direct WinAPI function for PureSplitter because PureSplitter is a own control/gadget of PB but here a workaround:
Code: Select all
EnableExplicit
Define PureSplitterWidth = 500
Define Handle_Main
Define Handle_Sub
Define RECT.RECT
Define WINDOWPLACEMENT.WINDOWPLACEMENT
Define NewPureSplitterWidth
Handle_Main = FindWindow_("WindowClass_2", 0)
Handle_Sub = FindWindowEx_(Handle_Main, 0, "PureSplitter", 0)
Handle_Sub = FindWindowEx_(Handle_Sub, 0, "PureSplitter", 0)
GetWindowRect_(Handle_Main, RECT)
NewPureSplitterWidth = ((RECT\Right-RECT\Left)-PureSplitterWidth)-20
SetWindowPos_(Handle_Sub, 0, 0, 0, NewPureSplitterWidth, 0, #SWP_SHOWWINDOW | #SWP_NOZORDER | #SWP_NOMOVE | #SWP_FRAMECHANGED)
GetWindowPlacement_(Handle_Main, WINDOWPLACEMENT)
If WINDOWPLACEMENT\showCmd = #SW_MAXIMIZE
ShowWindow_(Handle_Main, #SW_NORMAL)
ShowWindow_(Handle_Main, #SW_MAXIMIZE)
Else
ShowWindow_(Handle_Main, #SW_MAXIMIZE)
ShowWindow_(Handle_Main, #SW_NORMAL)
EndIf