Corroder Grandmaster Cheater Supreme Reputation: 75 Joined: 10 Apr 2015 Posts: 1667
|
Posted: Mon Mar 20, 2017 12:38 am Post subject: |
|
|
As akumakuja 28 said :
Quote: | Well first you have to dictate the states of the checkbox.
Then you need to set the trackbar up. Pos, onmouse events, value that is being changed, etc... |
Here is a sample, if I am not misunderstood what you want
Copy this script below to CE table lua script and execute,
Just a sample and you able to try implementing the logic to your script.
Code: | f = createForm()
f.Width = 200
f.Height = 200
f.Position = 'poScreenCenter'
c = createCheckBox(f)
c.Left = 10
c.Top = 10
c.Caption = 'Check Me To Show Track Bar'
l = createLabel(f)
l.Font.Size = 12
l.Caption = 'StingBx'
l.Top = c.Top + c.Height + 20
l.Left = math.floor(f.Width - l.Width) / 2
l.Visible = false
t = createTrackBar(f)
t.left = 20
t.top = f.height - 60
t.width = f.width - t.left - 20
t.height = 30
t.frequency = 1
t.Max = 48 --- Maximum Value for a variable you want to change
t.Min = 12 --- Maninum Value for a variable you want to change
t.position = 0
t.SelStart = 0
t.SelEnd = 0
t.Visible = false
l2 = createLabel(f)
l2.Caption = 'Font Size : 12'
l2.Top = t.Top + t.Height + 8
l2.Left = 10
l2.Visible = false
f.show()
---- input here what all stuffs you want change when it check / uncheck
function cCheck(sender)
if sender.Checked then
l.Visible = true
l2.Visible = true
t.Visible = true
else
l.Visible = false
l2.Visible = false
t.Visible = false
end
end
---- Change your variable values here according to trackbar position
function TrackBar1Change(sender)
l.Font.Size = t.Position
l2.Caption = 'Font Size : '..tostring(t.position)
l.Left = math.floor(f.Width - l.Width) / 2
l.Top = c.Top + c.Height + 20
end
t.onChange = TrackBar1Change --- execute trackbar change
c.onChange = cCheck --- execute check box change
|
|
|