Re: Multiple window problem
Posted: Tue Oct 27, 2015 9:10 am
This article from the PureBasic User Guide contains a code example showing the management of multiple windows.
The code consists of 708 lines of code!
UserGuide - Managing multiple windows with different content
http://www.purebasic.com/documentation/ ... _any2.html
The code consists of 708 lines of code!
UserGuide - Managing multiple windows with different content
http://www.purebasic.com/documentation/ ... _any2.html
In the previous article we examined one way in which a program can support multiple instances of a single type of window. In this one we are going to extend this concept further – developing a program that can support multiple instances of several different types of window, in this case three:
- The Button window – contains a list view and two buttons labelled 'Add' and 'Remove'. When the 'Add' button is clicked a random integer is added to the list view, when the 'Remove' button is clicked the currently highlighted entry in the list view is removed.
- The Date window – contains a list view and two buttons in the same way as the Button window but also contains a calendar gadget too, the window layout is altered to accommodate this additional control. When the 'Add' button is clicked, it is the currently selected date that is added to the list view.
- The Track window – contains two track bars, with a value between 0 and 100, and a string gadget. When the track bars are moved the string gadget is updated with the value of the second track bar subtracted from the first.