hodnotax = GetGadgetState(#trackbar_0)
hodnotay = GetGadgetState(#trackbar_1)
If hodnotax <> zvetsenix
zvetsenix = hodnotax
If pomer = 1
SetGadgetState(#trackbar_1, hodnotay)
EndIf
Aktualizuj_graf()
EndIf
If hodnotay <> zvetseniy
zvetseniy = hodnotay
If pomer = 1
SetGadgetState(#trackbar_0, hodnotax)
EndIf
Aktualizuj_graf()
EndIf [quote]
So, when I change value at trackbar 1, It should change trackbar 2 automaticly. Of course, it doesnt work, only with constants.[/quote]
hodnotax = GetGadgetState(#trackbar_0)
hodnotay = GetGadgetState(#trackbar_1)
If hodnotay <> zvetseniy
hodnotay = zvetseniy
If pomer = 1
SetGadgetState(#trackbar_1, hodnotay)
; Yet you already called "hodnotay" as whatever Trackbar_1 is already at!
EndIf
Aktualizuj_graf()
EndIf
If hodnotax <> zvetsenix
hodnotax = zvetsenix
If pomer = 1
SetGadgetState(#trackbar_0, hodnotax)
EndIf
Aktualizuj_graf()
EndIf
Without understanding your variable names OR if you have this in a procedure (in which case you should either get the numbers from INDISE the procedure or call them as GLOBAL... I can't help more!