TrackBarGadget - Variable steps or ticks
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
TrackBarGadget - Variable steps or ticks
Currently, tick markers (if flagged), are placed at every step. This is often not very useful because they are too close together. It would be great if the number of tick marks displayed could be defined by a simple var, e.g. TotalTicks = 10.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: TrackBarGadget - Variable steps or ticks
+1
Yeah I know, but keep in mind ... Leonardo da Vinci was also an autodidact.
-
- Enthusiast
- Posts: 252
- Joined: Mon Aug 16, 2010 4:29 am
Re: TrackBarGadget - Variable steps or ticks
+1
Or with a new argument:
Or with a new argument:
Code: Select all
TicStep = (BarMax - BarMin) / 5
Result = TrackBarGadget(#Gadget, x, y, Width, Height, BarMin, BarMax, TicStep [, Flags])
-
- Addict
- Posts: 1482
- Joined: Tue Feb 22, 2011 1:16 pm
Re: TrackBarGadget - Variable steps or ticks
Isn't that a Windows feature? I for one like to use arrow keys to advance back or forth every tick... it's counter-intuitive to move what you think is one single tick but it's really ten! No thanks.IdeasVacuum wrote:Currently, tick markers (if flagged), are placed at every step.
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
PureBasic: Born in 1998 and still going strong to this very day!
Re: TrackBarGadget - Variable steps or ticks
In the mean time (for windows only) :
Code: Select all
If OpenWindow(0,0,0,320,200,"CheckBoxGadget",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
h = TrackBarGadget(#PB_Any,270, 10, 20,170,0,1000,#PB_TrackBar_Vertical)
SetGadgetState(h, 800)
For a=50 To 1000 Step 50
SendMessage_(GadgetID(h), #TBM_SETTIC, 0, a)
Next
; SetWindowLong_(h, #GWL_STYLE, GetWindowLong_(h, #GWL_STYLE) | #TBS_LEFT)
h = TrackBarGadget(#PB_Any,20, 10, 200,27,0,1000)
SetGadgetState(h, 800)
For a=50 To 1000 Step 50
SendMessage_(GadgetID(h), #TBM_SETTIC, 0, a)
Next
Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
EndIf
Yeah I know, but keep in mind ... Leonardo da Vinci was also an autodidact.
Re: TrackBarGadget - Variable steps or ticks
Yeah. These every step ticks are very annoying...