Conclusions
Text-editing widgets of the major toolkits provide extensive facilities, so we should use these as much as possible in applications instead of trying to create new ones. A challenging application involves combining text with other types of data, such as drawings or images. Listing 7.2 (Parts 1–3) provides a simple solution. This is sufficient when there is room for the text, but not when text labels must be inserted around other displays. One solution is to use a minimal special text-entry function (for example the one in Listing 4.13) for the initial placement, then a regular text edit widget whenever text must be modified. Another solution is to create an entry form with each field corresponding to a line of text whose width is computed from available space in the drawing.
Dialog widgets can be adapted to many tasks: They provide a basic pop-up/pop-down mechanism, a container widget, and a set of standard buttons and callbacks. There is virtually no limit to the functionality that can be added to these.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2002 Kluwer Academic Publishers
About this chapter
Cite this chapter
(2002). Text and Dialog Widgets. In: Fundamentals of X Programming. Series in Computer Science. Springer, Boston, MA. https://doi.org/10.1007/0-306-46968-5_7
Download citation
DOI: https://doi.org/10.1007/0-306-46968-5_7
Publisher Name: Springer, Boston, MA
Print ISBN: 978-0-306-46065-4
Online ISBN: 978-0-306-46968-8
eBook Packages: Springer Book Archive