Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (juanex, AndrewAMD), 988 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
sliders initial value #382397
09/07/11 21:27
09/07/11 21:27
Joined: Mar 2005
Posts: 514
Brazil
Carloos Offline OP
User
Carloos  Offline OP
User

Joined: Mar 2005
Posts: 514
Brazil
Hi.

Lets consider that I have a hslider ( maybe algo a Vslider ) :

PANEL* PhPanel =
{
Bmap = PhTGA;
Pos_x = 0;
Pos_y = 0;
Layer = 1;

hslider(8,23,150,SlideTGA,0,10,brLong);

digits,180,23,4,"*",1000,vecBRwheel.x);
flags = show;
}

but, in this case, brLong variable is already "working" and has its value = 5.

I need that the hslider, when the level / panel load, is at the middle of the slider, representing its inicial value that isnt neither 0 or 10.

In other words, the hslider would start in the middel of the scale, not at the left.

Is it possible ?

Thanks in advance.

Re: sliders initial value [Re: Carloos] #382398
09/07/11 21:30
09/07/11 21:30
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline
Serious User
darkinferno  Offline
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
well i think it would start in the middle if the variable is set to 5 and:

lower limit = 0
upper limit = 10

I think the variable would have to be at 5 before the slider is setup though, am not sure what happens if you change the variable after the slider is created ?

Re: sliders initial value [Re: darkinferno] #382399
09/07/11 21:32
09/07/11 21:32
Joined: Mar 2005
Posts: 514
Brazil
Carloos Offline OP
User
Carloos  Offline OP
User

Joined: Mar 2005
Posts: 514
Brazil
wow, thats a fast reply... Thankyou.

In fact I´m setting the variable before of Panel creation, but the slider atarts at the left side.

Re: sliders initial value [Re: Carloos] #382400
09/07/11 21:37
09/07/11 21:37
Joined: Mar 2005
Posts: 514
Brazil
Carloos Offline OP
User
Carloos  Offline OP
User

Joined: Mar 2005
Posts: 514
Brazil
the code

----------------------------------------------------------------------

var brLong;
brLong = 5;

PANEL* PhPanel =
{
hslider(8,23,150,SlideTGA,0,10,brLong);
digits,180,23,2,"*",1,brLong);
flags = show;
}

----------------------------------------------------------------------

It starts from the left, always.

Re: sliders initial value [Re: Carloos] #382403
09/07/11 22:02
09/07/11 22:02
Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
Quad Online
Senior Expert
Quad  Online
Senior Expert

Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
you can't do assignment to global vars like that.

try
var brLong = 5;


3333333333
Re: sliders initial value [Re: Quad] #382404
09/07/11 22:14
09/07/11 22:14
Joined: Mar 2005
Posts: 514
Brazil
Carloos Offline OP
User
Carloos  Offline OP
User

Joined: Mar 2005
Posts: 514
Brazil
Thankyou, Quad.

I´m very new to LiteC.

Re: sliders initial value [Re: Quad] #382405
09/07/11 22:17
09/07/11 22:17
Joined: Mar 2005
Posts: 514
Brazil
Carloos Offline OP
User
Carloos  Offline OP
User

Joined: Mar 2005
Posts: 514
Brazil
Originally Posted By: Quad

var brLong = 5;


Perfect.

Now hslider starts in the desired iitial position.

Thankyou a lot Quad.


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1