/gui-widget-mixins

Tool tips, cue text and validation for text-field% GUI widgets in Racket

Primary LanguageRacketOtherNOASSERTION

gui-widget-mixins

Build Status

A small collection of mixin classes to improve the GUI widgets provided by Racket which can be used individually or combined together. They can be used to add tool tips, cue text, validation and decoration to text-field% GUI controls. This blog post describes how these mixins work and this library is an improved version of what is presented there. The following mixins are defined:

  • cue-mixin -- a mixin which will add a cue text to a text-field%, whenever the field is empty, this can be used to provide a hint for what the contents of the field are expected to be

  • decorate-mixin -- a mixin to decorate the contents of text-field% widgets.

  • tooltip-mixin -- a mixin which adds a tooltip to any GUI control, when the user hovers the mouse over the control

  • validate-mixin -- a mixin to provide data validation for text-field% widgets, for example to allow the user to only enter numbers, or valid dates

You can install this package using

raco pkg install gui-widget-mixins