2009-10-28 09:31 UTC
Hello,
as I already note in the SliderSample I wanted to upload a RangeSelector. It can be used for selecting a single range. In this case two percentage values are changed.
Short sample description
Custom single range selection.
Requirements
OpenDCL Runtime 5.x
Used OpenDCL functionalities
Long sample description, genesis
I participate to a project of a university for landscape architects. At this project plants and flowers have to be distributed on the ground according to certain rules. Rules can be followed absolutely (yes/no), by priority (how important is this rule, using random generator), and at least by having a value in a given range. Until now I didn't know how to define the range. Using a picture box may solve this. It could be also a base for multiple ranges.
Features of the selector
Divide now in mind the bar into 4 parts:
Enjoy it!
Fred
as I already note in the SliderSample I wanted to upload a RangeSelector. It can be used for selecting a single range. In this case two percentage values are changed.
Short sample description
Custom single range selection.
Requirements
OpenDCL Runtime 5.x
Used OpenDCL functionalities
- Resizable modeless form
- Working with OnPaint event of a picture box
- Working with temorary drawings in a picturebox
- Working with mouse events
Long sample description, genesis
I participate to a project of a university for landscape architects. At this project plants and flowers have to be distributed on the ground according to certain rules. Rules can be followed absolutely (yes/no), by priority (how important is this rule, using random generator), and at least by having a value in a given range. Until now I didn't know how to define the range. Using a picture box may solve this. It could be also a base for multiple ranges.
Features of the selector
- To set the initial values click anywhere into the picturebox (for instance onto the small text).
- Click left mousebutton on the left hand side of the blue bar's left end, the lower end of the selection will be changed to the clickpoint. Moving the mouse while the left mousebutton is pressed, the lower end changes as long you move the mouse.
- Click left mousebutton on the right hand side of the blue bar's right end, the upper end of the selection will be changed to the clickpoint. Moving the mouse while the left mousebutton is pressed, the upper end changes as long you move the mouse.
Divide now in mind the bar into 4 parts:
- Click the left mouse button within the left quarter of the bar, the lower end of the selection will be changed to the clickpoint.
- Click the left mouse button within the right quarter of the bar, the upper end of the selection will be changed to the clickpoint.
- Click within the middle two quarters of the blue bar you can move the blue bar without changing the range width. If you move the bar to the left or to the right end the bar stops there, even if you're going on moving the mouse (until you have reached the outer quarter of the blue bar).
- The blue bar will automatically get stretched if the form will be resized.
Enjoy it!
Fred
