BBC BASIC for Windows
« slider parameters & minimal value »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:27pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: slider parameters & minimal value  (Read 862 times)
dynamic35
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 34
xx slider parameters & minimal value
« Thread started on: Mar 8th, 2012, 2:43pm »

1)There is possibility to put max value (*right end) of slider. How to initialize ruler's left end (0 is always there) I need -40

2)By the style 800 I get nice little numbers above ruler. Where to read those numbers for application?

(*) PROC_showtrackbar(tb%, max%)

Dynamic35..
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: slider parameters & minimal value
« Reply #1 on: Mar 8th, 2012, 3:06pm »

on Mar 8th, 2012, 2:43pm, dynamic35 wrote:
How to initialize ruler's left end (0 is always there) I need -40

Send a TBM_SETRANGEMIN message:

http://msdn.microsoft.com/en-us/library/windows/desktop/bb760226.aspx

Code:
SYS "SendMessage", !tb%, TBM_SETRANGEMIN, 1, -40 

Quote:
By the style 800 I get nice little numbers above ruler. Where to read those numbers for application?

Sorry, I don't understand the question. Style &800 is TBS_NOTIFYBEFOREMOVE (Vista or later only).

Richard.
User IP Logged

dynamic35
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 34
xx Re: slider parameters & minimal value
« Reply #2 on: Mar 9th, 2012, 09:17am »

on Mar 8th, 2012, 3:06pm, Richard Russell wrote:
Send a TBM_SETRANGEMIN message:

http://msdn.microsoft.com/en-us/library/windows/desktop/bb760226.aspx

Code:
SYS "SendMessage", !tb%, TBM_SETRANGEMIN, 1, -40 


Sorry, I don't understand the question. Style &800 is TBS_NOTIFYBEFOREMOVE (Vista or later only).

Richard.


INSTALL @lib$+"WINLIB3"
REM RULER with negative and positive datas Test by XP , date: 9.3.2012/dyn35
xpos%=120 :ypos%=25 : width%=400 : height%=30
P%=-40 : S%=50
T%=800 : REM Style 800 puts x numbers automatically above moving rulerhand
TBM_SETRANGEMIN=1031
tb%= FN_createtrackbar(@hwnd%,xpos%,ypos%,width%,height%,T%)
REPEAT
SYS "SendMessage", !tb%, TBM_SETRANGEMIN, 1, P%
PROC_showtrackbar(tb%, S%)
trackpos%= FN_trackbarpos(tb%)
CLS : PRINT TAB(1,2)"x=";trackpos%
WAIT 20
UNTIL FALSE
PROC_removetrackbar(tb%)
END
This seems to work now
Thankyous from Dynamic35.
Ps.
Style 800 was an 'accidental' finding and I like it since it seems to work in my XP
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: slider parameters & minimal value
« Reply #3 on: Mar 9th, 2012, 10:53am »

on Mar 9th, 2012, 09:17am, dynamic35 wrote:
Style 800 was an 'accidental' finding and I like it since it seems to work in my XP

Right, so that's 800 decimal, therefore &320 hexadecimal, which is:

Code:
TBS_REVERSED + TBS_TOOLTIPS + TBS_ENABLESELRANGE 

I suspect the 'little numbers' you referred to are simply the tooltips created by the TBS_TOOLTIPS style.

Richard.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls