742 views
in GUI Development by
I have to implement a horizontal slider and i have a button . So i drag the slider handle , the corresponding change should be refelcted in the button itself .

Since I am new to embedded Wizard , I am not familiar with the IDE . Any suggestions would be welcomed

2 Answers

0 votes
by
What do you mean with 'reflected in the button itself'?
by
What i meant was , if i drag the slider , the slider value should also get reflected on the button .
0 votes
by

You want the slider value as text being shown within the button. In such case:

1. Design your button, so it contains a Text view to show the value.

2. In your button implement a property to serve as interface, through which you can pass text to display within the Text view of the button. Name the property e.g. Caption. Since you want text to be passed via the property specify its data type string.

3. Implement the properties OnSet method. For example:

pure Caption = value;
TextView.String = value;

4. In your component where the Slider and Button are existing add a slot method.

4. Connect the sot method with the slider so it is signaed every time you drag the slider.

5. In the slot method implement code to update the button. For example:

Button.Caption = string( Slider.Value );

For more details we recommend you to take a look at the documentation in the chapter Working with Embedded Wizard.

Hope it helps you further.

Best regards

Paul Banach

by
I am using an Evaluation version of embedded wiard . As  i am dragging my slider on the main window , it is not allowing me to .

Is it beacuse of the evaluated version which i am using ?
by

You are evidently trying to add a 'Slider component' from the Gallery Components folder. The members in the folder Components are templates intended to create new GUI components. Technically seen, using them you create a new class, which then can be adapted and enhanced according to your needs. Classes, in turn, can exist within a unit only. You can Drag-Drop the templates from the folder Components into a unit only!

Once you have the class of the slider component stored in a unit, you can embed instances of this slider within another component classes.

Besides the above mentioned component templates, Embedded Izard is delivered also with a set of ready to use widgets. Unlike the component templates, you don't need to add the widgets to a unit. They are already existing within units belonging to the framework Mosaic.  As such you can Drag-Drop them directly from the Gallery into the Composer.

Summary: there are two different kinds of sliders: (1) Templates to create your own Slider components. (2) Ready to use widgets you can add directly to your GUI.

More details are found in our documentation.

 

by
I went through your documentation . Although I did not get a clear picture on how to use the slider for my understanding .

Currently I am trying to drag the slider on my canvas from templates . Which is the other feasible way for me to use the slider component

for now I did not find any other options as such

Embedded Wizard Website | Privacy Policy | Imprint

...