Re: 3-way slider control
I made a multiway one https://forums.livecode.com/viewtopic.php?f=7=35903=205657 On Wed, 26 May 2021 at 20:45, Paul Dupuis via use-livecode < use-livecode@lists.runrev.com> wrote: > :-) > > On 5/26/2021 3:36 PM, Alex Tweedly via use-livecode wrote: > > I'd prefer it like ... > > > > On 26/05/2021 18:28, Paul Dupuis via use-livecode wrote: > >> What, like this: > >> > >> on scrollbarDrag pNewPosition > >> local tToolTip = "CiC only,both CiC and Source,Source only" > >> set the thumbPosition of me to pNewPosition > >> set the tooltip of me to "Text style changes will be applied > >> to"&&(item pNewPosition+1 of tToolTip) > > set the enabled of fld "CiC_Label" to (pNewPosition=0 or > > pNewPosition=1) > > set the enabled of fld "Src_Label" to (pNewPosition=1 or > > pNewPosition=2) > > end scrollbarDrag > > > > or, of course, > > > >set the enabled of fld "CiC_Label" to (pNewPosition <= 1) > >set the enabled of fld "Src_Label" to (pNewPosition >= 1) > > > > All a matter of personal preference :-) > > > > Alex. > > > > > > ___ > > use-livecode mailing list > > use-livecode@lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: 3-way slider control
On 5/26/21 2:41 PM, Jim Lambert via use-livecode wrote: go url "http://netrin.on-rev.com/misc/three_state_toggle.livecode; This stack contains a group which is a three-state toggle switch. The myState of the group contains its current state which is either "ON","OFF" or "MID" You can customize the states' colors by setting the color constants. See the group script. To use: Either drag the thumb OR Tap at the left, right or center of the control. That is perfectly lovely! Thank you. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: 3-way slider control
Thank you. On 5/26/2021 3:41 PM, Jim Lambert via use-livecode wrote: go url "http://netrin.on-rev.com/misc/three_state_toggle.livecode; This stack contains a group which is a three-state toggle switch. The myState of the group contains its current state which is either "ON","OFF" or "MID" You can customize the states' colors by setting the color constants. See the group script. To use: Either drag the thumb OR Tap at the left, right or center of the control. Feel free to use, change, copy, whatever. Jim Lambert ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: 3-way slider control
Cool custom 3 state toggle switch! A little more work, and code but truly a worth-while result. That will make Paul happy for sure! Thanks! Rick > On May 26, 2021, at 3:41 PM, Jim Lambert via use-livecode > wrote: > > go url "http://netrin.on-rev.com/misc/three_state_toggle.livecode; > > This stack contains a group which is a three-state toggle switch. > > The myState of the group contains its current state which is either > "ON","OFF" or "MID" > > You can customize the states' colors by setting the color constants. > > See the group script. > > To use: Either drag the thumb OR Tap at the left, right or center of the > control. > > Feel free to use, change, copy, whatever. > Jim Lambert > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: 3-way slider control
:-) On 5/26/2021 3:36 PM, Alex Tweedly via use-livecode wrote: I'd prefer it like ... On 26/05/2021 18:28, Paul Dupuis via use-livecode wrote: What, like this: on scrollbarDrag pNewPosition local tToolTip = "CiC only,both CiC and Source,Source only" set the thumbPosition of me to pNewPosition set the tooltip of me to "Text style changes will be applied to"&&(item pNewPosition+1 of tToolTip) set the enabled of fld "CiC_Label" to (pNewPosition=0 or pNewPosition=1) set the enabled of fld "Src_Label" to (pNewPosition=1 or pNewPosition=2) end scrollbarDrag or, of course, set the enabled of fld "CiC_Label" to (pNewPosition <= 1) set the enabled of fld "Src_Label" to (pNewPosition >= 1) All a matter of personal preference :-) Alex. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: 3-way slider control
go url "http://netrin.on-rev.com/misc/three_state_toggle.livecode; This stack contains a group which is a three-state toggle switch. The myState of the group contains its current state which is either "ON","OFF" or "MID" You can customize the states' colors by setting the color constants. See the group script. To use: Either drag the thumb OR Tap at the left, right or center of the control. Feel free to use, change, copy, whatever. Jim Lambert ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: 3-way slider control
I'd prefer it like ... On 26/05/2021 18:28, Paul Dupuis via use-livecode wrote: What, like this: on scrollbarDrag pNewPosition local tToolTip = "CiC only,both CiC and Source,Source only" set the thumbPosition of me to pNewPosition set the tooltip of me to "Text style changes will be applied to"&&(item pNewPosition+1 of tToolTip) set the enabled of fld "CiC_Label" to (pNewPosition=0 or pNewPosition=1) set the enabled of fld "Src_Label" to (pNewPosition=1 or pNewPosition=2) end scrollbarDrag or, of course, set the enabled of fld "CiC_Label" to (pNewPosition <= 1) set the enabled of fld "Src_Label" to (pNewPosition >= 1) All a matter of personal preference :-) Alex. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: 3-way slider control
On 5/26/2021 12:16 PM, Curry Kenworthy via use-livecode wrote: Paul: > I created a slider with a label on the left and right in a group. > The slider is set to min 0, max 2, inc 1 and it's script is: > on scrollbarDrag pNewPosition > [...] I like this UI approach! Your script could be shorter. A 4-liner or 5-liner would be ideal; just eliminate the switch. (The current code is essentially repeating the same commands 3 times.) What, like this: on scrollbarDrag pNewPosition local tToolTip = "CiC only,both CiC and Source,Source only" set the thumbPosition of me to pNewPosition set the tooltip of me to "Text style changes will be applied to"&&(item pNewPosition+1 of tToolTip) if pNewPosition=0 or pNewPosition=1 then enable fld "CiC_Label" else disable fld "CiC_Label" if pNewPosition=1 or pNewPosition=2 then enable fld "Src_Label" else disable fld "Src_Label" end scrollbarDrag ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: 3-way slider control
Paul: > I created a slider with a label on the left and right in a group. > The slider is set to min 0, max 2, inc 1 and it's script is: > on scrollbarDrag pNewPosition > [...] I like this UI approach! Your script could be shorter. A 4-liner or 5-liner would be ideal; just eliminate the switch. (The current code is essentially repeating the same commands 3 times.) Best wishes, Curry Kenworthy Custom Software Development "Better Methods, Better Results" LiveCode Training and Consulting http://livecodeconsulting.com/ ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: 3-way slider control
I thought of this before I saw Paul’s solution: Name the scrollbar: ScrollbarThreeStateButtonValue on mouseUp put the thumbposition of me into ScrollbarThreeStateButtonValue put the round of ScrollbarThreeStateButtonValue into VarScrollbarThreeStateButton2 set the thumbposition of me to VarScrollbarThreeStateButton2 end mouseUp > On May 25, 2021, at 9:08 PM, J. Landman Gay via use-livecode > wrote: > >> Regardless, I have decided to use a standard LC slider set to >> -1,0,+1 with some labels grouped to it. It works like a charm >> and minimizes the number of graphics/objects and code. > > I was interested to see that; it's clever, and it does work if you click in > the slider bar. But dragging the indicator allows partial decimal positions. > I don't know if that matters for your purposes. > > -- > Jacqueline Landman Gay | jac...@hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com > > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: 3-way slider control
On 5/25/2021 9:08 PM, J. Landman Gay via use-livecode wrote: Regardless, I have decided to use a standard LC slider set to -1,0,+1 with some labels grouped to it. It works like a charm and minimizes the number of graphics/objects and code. I was interested to see that; it's clever, and it does work if you click in the slider bar. But dragging the indicator allows partial decimal positions. I don't know if that matters for your purposes. I created a slider with a label on the left and right in a group. The slider is set to min 0, max 2, inc 1 and it's script is: on scrollbarDrag pNewPosition switch pNewPosition case 0 enable fld "CiC_Label" disable fld "Src_Label" set the tooltip of me to "Text style changes will be applied to CiC only" set the thumbPosition of me to 0 break case 1 enable fld "CiC_Label" enable fld "Src_Label" set the tooltip of me to "Text style changes will be applied to both CiC and Source" set the thumbPosition of me to 1 break case 2 disable fld "CiC_Label" enable fld "Src_Label" set the tooltip of me to "Text style changes will be applied to Source only" set the thumbPosition of me to 2 break end switch end scrollbarDrag The set the thumbPosition forces any attempt at sliding to move to only left, center, and right positions. When left, the left label is enabled, the right label is disabled, and the tooltip for the slider reflects the choice. When right, the right label is enabled, left label disabled and the tooltip updated. When center, both labels are enabled and the tool tip updated. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: 3-way slider control
Regardless, I have decided to use a standard LC slider set to -1,0,+1 with some labels grouped to it. It works like a charm and minimizes the number of graphics/objects and code. I was interested to see that; it's clever, and it does work if you click in the slider bar. But dragging the indicator allows partial decimal positions. I don't know if that matters for your purposes. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: 3-way slider control
Yea, I know I can make my own custom controls and have on numerous occasions. I *MUCH* prefer to use existing controls as I dislike UI coding. To me it is the most tedious part of app development. This google search shows (at least the majority of initial images) a bunch of 2-position on/off switches that are often circular or squares "thumbs" in a oval or rectangular "switch". I was looking for something like that (or LC's switch widget) but with 3 positions. https://www.google.com/search?q=sliding+switch+icons=isch=2ahUKEwiR6vXFyuXwAhU517sIHfbeA-kQ2-cCegQIABAA=sliding+switch+icons_lcp=CgNpbWcQAzoGCAAQBxAeOggIABAIEAcQHlCFMFijOWC_PWgAcAB4AIABnwGIAeEIkgEDMC44mAEAoAEBqgELZ3dzLXdpei1pbWfAAQE=img=BFKtYJHYH7mu7_UP9r2PyA4=910=1920 Regardless, I have decided to use a standard LC slider set to -1,0,+1 with some labels grouped to it. It works like a charm and minimizes the number of graphics/objects and code. Thanks, On 5/25/2021 1:14 PM, Rick Harrison via use-livecode wrote: Hi Paul, You can make your own custom controls in LiveCode. Perhaps you just want something more like three radio buttons, or simulate a slider control with buttons and graphics. Give us an example image to help clarify what you want. Thanks, Rick On May 25, 2021, at 11:38 AM, Paul Dupuis via use-livecode wrote: Rick and Jacqueline, Thank you for the horizontal slider suggestions. This could suffice for what I need. I was imagining more of the common "circle inside an oval" "switch" control you see on the web and in apps these days. However, beggars can't always be choosers and I the slider works well for what I need. Roger, Thank you. ScrollbarOmatic looks like I could adjust setting to get something closer to a "circle inside an oval" 3-position switch. FYI as I was adjusting the controls to get the style I am seeking the following error popped up: *compiling at 11:34:54 AM* Type Expression: bad factor Object backBar Line if tx ≥ tIndEndPos then Hint ≥ I did not seem to actually impact continue to refine the appearance. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: 3-way slider control
Nice! I like the idea of this because it gets the readout away from the cursor so that you can read it. Roger > On May 25, 2021, at 11:18 AM, Richmond via use-livecode > wrote: > > Sorry: went a bit bonkers: > > https://forums.livecode.com/viewtopic.php?f=7=35903 > > Richmond. > > On 25.05.21 20:23, Roger Guay via use-livecode wrote: >> Ah yes, I knew that but had forgotten it. Thank you, Klaus! >> >> Roger >> >>> On May 25, 2021, at 10:11 AM, Klaus major-k via use-livecode >>> wrote: >>> >>> Hi freinds, >>> >>> this - ≥ >>> is a MAC-only character and will throw an error on Windows! >>> Use/replace with: >>> <= = >>> <> >>> for full platform comatibilty! >>> Am 25.05.2021 um 19:06 schrieb Roger Guay via use-livecode : Hi Paul, I’m not able to duplicate the error here. Can you tell what control you were adjusting? You should be able to achieve what you want by changing the ‘backBar” grc style from roundrect to oval. You might have to play with the code a bit, but it should work. Roger > Thank you. ScrollbarOmatic looks like I could adjust setting to get > something closer to a "circle inside an oval" 3-position switch. FYI as I > was adjusting the controls to get the style I am seeking the following > error popped up: > > *compiling at 11:34:54 AM* > > Type Expression: bad factor > > Object backBar > > Line if tx ≥ tIndEndPos then > > Hint ≥ > > I did not seem to actually impact continue to refine the appearance. >>> Best >>> >>> Klaus >>> >>> -- >>> Klaus Major >>> https://www.major-k.de >>> https://www.major-k.de/bass >>> kl...@major-k.de >>> >>> >>> ___ >>> use-livecode mailing list >>> use-livecode@lists.runrev.com >>> Please visit this url to subscribe, unsubscribe and manage your >>> subscription preferences: >>> http://lists.runrev.com/mailman/listinfo/use-livecode >> ___ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription >> preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: 3-way slider control
Sorry: went a bit bonkers: https://forums.livecode.com/viewtopic.php?f=7=35903 Richmond. On 25.05.21 20:23, Roger Guay via use-livecode wrote: Ah yes, I knew that but had forgotten it. Thank you, Klaus! Roger On May 25, 2021, at 10:11 AM, Klaus major-k via use-livecode wrote: Hi freinds, this - ≥ is a MAC-only character and will throw an error on Windows! Use/replace with: <= = <> for full platform comatibilty! Am 25.05.2021 um 19:06 schrieb Roger Guay via use-livecode : Hi Paul, I’m not able to duplicate the error here. Can you tell what control you were adjusting? You should be able to achieve what you want by changing the ‘backBar” grc style from roundrect to oval. You might have to play with the code a bit, but it should work. Roger Thank you. ScrollbarOmatic looks like I could adjust setting to get something closer to a "circle inside an oval" 3-position switch. FYI as I was adjusting the controls to get the style I am seeking the following error popped up: *compiling at 11:34:54 AM* Type Expression: bad factor Object backBar Line if tx ≥ tIndEndPos then Hint ≥ I did not seem to actually impact continue to refine the appearance. Best Klaus -- Klaus Major https://www.major-k.de https://www.major-k.de/bass kl...@major-k.de ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: 3-way slider control
Ah yes, I knew that but had forgotten it. Thank you, Klaus! Roger > On May 25, 2021, at 10:11 AM, Klaus major-k via use-livecode > wrote: > > Hi freinds, > > this - ≥ > is a MAC-only character and will throw an error on Windows! > Use/replace with: > <= >> = > <> > for full platform comatibilty! > >> Am 25.05.2021 um 19:06 schrieb Roger Guay via use-livecode >> : >> >> Hi Paul, I’m not able to duplicate the error here. Can you tell what control >> you were adjusting? >> >> You should be able to achieve what you want by changing the ‘backBar” grc >> style from roundrect to oval. You might have to play with the code a bit, >> but it should work. >> >> Roger >>> >>> Thank you. ScrollbarOmatic looks like I could adjust setting to get >>> something closer to a "circle inside an oval" 3-position switch. FYI as I >>> was adjusting the controls to get the style I am seeking the following >>> error popped up: >>> >>> *compiling at 11:34:54 AM* >>> >>> Type Expression: bad factor >>> >>> Object backBar >>> >>> Line if tx ≥ tIndEndPos then >>> >>> Hint ≥ >>> >>> I did not seem to actually impact continue to refine the appearance. > > Best > > Klaus > > -- > Klaus Major > https://www.major-k.de > https://www.major-k.de/bass > kl...@major-k.de > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: 3-way slider control
Hi Paul, You can make your own custom controls in LiveCode. Perhaps you just want something more like three radio buttons, or simulate a slider control with buttons and graphics. Give us an example image to help clarify what you want. Thanks, Rick > On May 25, 2021, at 11:38 AM, Paul Dupuis via use-livecode > wrote: > > Rick and Jacqueline, > > Thank you for the horizontal slider suggestions. This could suffice for what > I need. I was imagining more of the common "circle inside an oval" "switch" > control you see on the web and in apps these days. However, beggars can't > always be choosers and I the slider works well for what I need. > > Roger, > > Thank you. ScrollbarOmatic looks like I could adjust setting to get something > closer to a "circle inside an oval" 3-position switch. FYI as I was adjusting > the controls to get the style I am seeking the following error popped up: > > *compiling at 11:34:54 AM* > > Type Expression: bad factor > > Object backBar > > Line if tx ≥ tIndEndPos then > > Hint ≥ > > I did not seem to actually impact continue to refine the appearance. > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: 3-way slider control
Hi freinds, this - ≥ is a MAC-only character and will throw an error on Windows! Use/replace with: <= >= <> for full platform comatibilty! > Am 25.05.2021 um 19:06 schrieb Roger Guay via use-livecode > : > > Hi Paul, I’m not able to duplicate the error here. Can you tell what control > you were adjusting? > > You should be able to achieve what you want by changing the ‘backBar” grc > style from roundrect to oval. You might have to play with the code a bit, but > it should work. > > Roger >> >> Thank you. ScrollbarOmatic looks like I could adjust setting to get >> something closer to a "circle inside an oval" 3-position switch. FYI as I >> was adjusting the controls to get the style I am seeking the following error >> popped up: >> >> *compiling at 11:34:54 AM* >> >> Type Expression: bad factor >> >> Object backBar >> >> Line if tx ≥ tIndEndPos then >> >> Hint ≥ >> >> I did not seem to actually impact continue to refine the appearance. Best Klaus -- Klaus Major https://www.major-k.de https://www.major-k.de/bass kl...@major-k.de ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: 3-way slider control
Hi Paul, I’m not able to duplicate the error here. Can you tell what control you were adjusting? You should be able to achieve what you want by changing the ‘backBar” grc style from roundrect to oval. You might have to play with the code a bit, but it should work. Roger > > Thank you. ScrollbarOmatic looks like I could adjust setting to get something > closer to a "circle inside an oval" 3-position switch. FYI as I was adjusting > the controls to get the style I am seeking the following error popped up: > > *compiling at 11:34:54 AM* > > Type Expression: bad factor > > Object backBar > > Line if tx ≥ tIndEndPos then > > Hint ≥ > > I did not seem to actually impact continue to refine the appearance. > > ___ ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: 3-way slider control
Rick and Jacqueline, Thank you for the horizontal slider suggestions. This could suffice for what I need. I was imagining more of the common "circle inside an oval" "switch" control you see on the web and in apps these days. However, beggars can't always be choosers and I the slider works well for what I need. Roger, Thank you. ScrollbarOmatic looks like I could adjust setting to get something closer to a "circle inside an oval" 3-position switch. FYI as I was adjusting the controls to get the style I am seeking the following error popped up: *compiling at 11:34:54 AM* Type Expression: bad factor Object backBar Line if tx ≥ tIndEndPos then Hint ≥ I did not seem to actually impact continue to refine the appearance. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: 3-way slider control
And if you need color and stuff, you can download my ScrollbarOmatic under Roger Guay from Sample Stacks. Roger > On May 24, 2021, at 3:28 PM, J. Landman Gay via use-livecode > wrote: > > On 5/24/21 3:18 PM, Paul Dupuis via use-livecode wrote: >> Hi all, >> I am looking to see if anyone has a 3-positions slider control they might be >> willing to share. I need a control that has a "left, middle, and Right" >> positions (whatever they are called). Prefer horizontal orientation and >> resizable so I can adjust the size to the screen area where it needs to go, >> but I can resize graphics if needed. > > You can do this with LC's built-in horizontal scrollbar. Drag a Slider > control to the card. Set the start value to 1 and the end value to 3. By > default there will be numbers displayed but you can turn those off and use > labels underneath instead. > > Put this script into the slider. It should make the slider snap to one of the > three positions: > > > on scrollBarDrag > set the thumbPos of me to the thumbpos of me mod(4) > end scrollBarDrag > > If you want to change the color, use an effects overlay. None of the built-in > color properties apply. > > > -- > Jacqueline Landman Gay | jac...@hyperactivesw.com > HyperActive Software | http://www.hyperactivesw.com > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: 3-way slider control
On 5/24/21 3:18 PM, Paul Dupuis via use-livecode wrote: Hi all, I am looking to see if anyone has a 3-positions slider control they might be willing to share. I need a control that has a "left, middle, and Right" positions (whatever they are called). Prefer horizontal orientation and resizable so I can adjust the size to the screen area where it needs to go, but I can resize graphics if needed. You can do this with LC's built-in horizontal scrollbar. Drag a Slider control to the card. Set the start value to 1 and the end value to 3. By default there will be numbers displayed but you can turn those off and use labels underneath instead. Put this script into the slider. It should make the slider snap to one of the three positions: on scrollBarDrag set the thumbPos of me to the thumbpos of me mod(4) end scrollBarDrag If you want to change the color, use an effects overlay. None of the built-in color properties apply. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: 3-way slider control
Hi Paul, Grab a horizontal slider control. Set the start position to -1 Set the end position to +1 Set the current position to 0 Make it any length you want. If you try clicking on a 1/4 setting it will spring to the next value, giving it the left middle and right positions you want. Let me know if that works well enough for you. Rick > On May 24, 2021, at 4:18 PM, Paul Dupuis via use-livecode > wrote: > > Hi all, > > I am looking to see if anyone has a 3-positions slider control they might be > willing to share. I need a control that has a "left, middle, and Right" > positions (whatever they are called). Prefer horizontal orientation and > resizable so I can adjust the size to the screen area where it needs to go, > but I can resize graphics if needed. > > Thank you to anyone (and everyone) in advance. > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode