cancel
Showing results for 
Search instead for 
Did you mean: 

Non-Graphic Slider

DSwea.1
Associate III

Because I am working on a project without external Flash, it is critical that use of images be highly restricted because of the impact on internal Flash usage. We'd like to use TGFX sliders, but it seems that the minimum footprint is about 30kB, an unacceptable amount.

I'm therefore attempting to create various widgets using basic geometric shapes, in this case a box with border and a line widget, both contained within a simple container.

I've created a class LineD as a subclass of Line in order to be able to override Line's "handleDragEvent" virtual function. In my override, I want to constrain the movement of the line to the horizontal, and limit its range to the container in which it resides. This is pretty kludgey, but I've managed to do so (have to adjust both the line widget's coordinates to keep it in place, plus the coordinates of the actual line inside the widget).

The problem is that, when handleDragEvent() is invoked, the line widget has already been dragged to a new position, so I must 1) restore the line widget to its position, and 2) move the line within the widget. In execution, this results in momentary movement of the line outside the desired limits, which is clearly visible.

Any suggestions as to handle this situation without resort to images are appreciated. I really like TGFX and hope to continue with it on other projects with external resources. But it seems that almost every widget in the TGFX suite is in some manner reliant on PNG images, which can quickly exhaust limited Flash availability.

1 REPLY 1
MM..1
Chief III

How size is your slider xy