Skip to content

Instantly share code, notes, and snippets.

@Metaxal
Created March 31, 2021 09:02
Show Gist options
  • Save Metaxal/946aa17033c10e76c48a74127ae0b11b to your computer and use it in GitHub Desktop.
Save Metaxal/946aa17033c10e76c48a74127ae0b11b to your computer and use it in GitHub Desktop.
Dragrable panels to resize containers by dragging the space between them
#lang racket/gui
(require framework)
(define fr (new frame% [label "gui"] [width 500] [height 500]))
(define p (new panel:vertical-dragable% [parent fr]))
(define pt (new panel:horizontal-dragable% [parent p] [border 1] [style '(border)]))
(define pb (new panel:horizontal-dragable% [parent p] [border 1] [style '(border)]))
(define ptl (new panel% [parent pt] [border 1] [style '(border)]))
(define ptr (new panel% [parent pt] [border 1] [style '(border)]))
(define pbl (new panel% [parent pb] [border 1] [style '(border)]))
(define pbr (new panel% [parent pb] [border 1] [style '(border)]))
(send fr show #t)
@Metaxal
Copy link
Author

Metaxal commented Mar 31, 2021

Screenshot from 2021-03-31 10-03-08

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment