Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Slider Control
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01275347
Message ID:
01275710
Vues:
25
>>>>>>>>>>>Great.
>>>>>>>>>>>
>>>>>>>>>>>Now there are some other things to add:
>>>>>>>>>>>
>>>>>>>>>>>1 - InteractiveChange event
>>>>>>>>>>> When the user moves the mouse when left clicking the mouse
>>>>>>>>>>>2 - Orientation (0 = Horizontal / 1 = Vertical)
>>>>>>>>>>>3 - Tick Frequency
>>>>>>>>>>>4 - Tick Style (0 - BottomRight 1 - TopLeft 2 - Both 3 - No Ticks)
>>>>>>>>>>>5 - Line below the button
>>>>>>>>>>>6 - SmallChange / Big Change
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>Yes, I already have some of this in there. I just couldn't get the movement right. As soon as its
>>>>>>>>>>done, I'll send you a copy.
>>>>>>>>
>>>>>>>>
>>>>>>>>Ok, I'd love some help. Here's the project
>>>>>>>>http://www.geocities.com/kevin.marois/slider/xslider.zip
>>>>>>>>
>>>>>>>>Run the form Demo to see where I'm at.
>>>>>>>>
>>>>>>>>I was about to code the _SetValue and _PositionThumb methods.
>>>>>>>>
>>>>>>>>So far, _SetValue is called from the MouseDown of the control
>>>>>>>>_PositionThumb is called from iValue_Assign.
>>>>>>>>
>>>>>>>>Those 2 should be fairly simple. If you could work on those and and send it
>>>>>>>>back, I'll pick it up from there in the morning
>>>>>>>>
>>>>>>>>I welcome and and all suggestions.
>>>>>>>>
>>>>>>>>Thanks
>>>>>>>
>>>>>>>
>>>>>>>Hi Kevin,
>>>>>>>
>>>>>>>Thanks for the files.
>>>>>>>I started coding it, but got so excited, and could not stop :-)
>>>>>>>
>>>>>>>I went a lot further. Please download my version:
>>>>>>>
>>>>>>>http://weblogs.foxite.com/files/cesarchalom/slidebarx/SlideBarX.zip
>>>>>>>
>>>>>>>
>>>>>>>Here are the main changes:
>>>>>>>
>>>>>>>- Allow the mouse to slide in horizontal and vertical
>>>>>>>- Added the Value property
>>>>>>>- Added the "Scrolled" event, to make it compatible with the ActiveX from CTL32 (This will eliminate "ValueChanged")
>>>>>>>- Recreated the Track images, making it much taller / wider, in order to keep the appearance when the control is big.
>>>>>>>- Value assignments. Now you can assign a value directly to the control, and the slidebar will automatically update its position.
>>>>>>>
>>>>>>>
>>>>>>>- Some other various minor tweaks.
>>>>>>>
>>>>>>>
>>>>>>>There are still some things missing:
>>>>>>>
>>>>>>>1 - to code the horizontal lines
>>>>>>>2 - To enable "Small Change / BigChange"
>>>>>>>
>>>>>>>
>>>>>>>Please run the sample again, it was completely updated :-)
>>>>>>>
>>>>>>>Hope you like
>>>>>>>
>>>>>>>Cesar
>>>>>>
>>>>>>
>>>>>>
>>>>>>Very nice. I'll do the horizontal lines now.
>>>>>>
>>>>>>As far as the Small/Big change, I have already added a property called iIncrementStyle, where
>>>>>>0 means that the thumb is automatically aligned to the nearest tickmark, and 1 means that the
>>>>>>thumb can be moved anywhere.
>>>>>>
>>>>>>I'm also going to put code in the MouseEnter and MouseLeave to change the color of
>>>>>>the thumb, and finally I am also going to add a focus rectangle.
>>>>>>
>>>>>>I'll have it all done today and send it back.
>>>>>>
>>>>>>Thanks. Nice work.
>>>>>
>>>>>
>>>>>Cool !
>>>>>
>>>>>I'll wait for your next version till I restart working on it.
>>>>
>>>>
>>>>I noticed that you added a Value property, with Access and Assign methods. I'm guessing
>>>>that you didn't see the property iValue with it's Assign method. Are you ok with me replacing
>>>>the code in iValue_Assign with what you have in Value_Assign?
>>>>
>>>>The reason is that I have been using Hungarian notation for the properties (iValue instead of Value),
>>>>and I wanted to keep them the same.
>>>>
>>>>Sound Ok?
>>>
>>>
>>>Yes, I noticed that.
>>>
>>>Well, it's your control.
>>>
>>>I replaced the iValue for "Value" just to make it compatible with the CTL32 ActiveX.
>>>
>>>Also, I removed the event "ValueChanged", and replaced it with "Scrolled" that is the name that the CTL32 Control uses.
>>>
>>>They all do the same thing...
>>>Choose the way you prefer.
>>>
>>>
>>>Another point to think:
>>>The way aI coded, Value / iValue can be range only between 0 and 100. Maybe the best is to allow the user to define the ranges, and the control will automatically update itself.
>>
>>
>>Ok, changes are here: http://www.geocities.com/kevin.marois/slider/xslider.zip
>>
>>I added the lines when the control is horizontal, and I added the focus rectangle. The rectangle
>>is be controlable via the ShowFocus property. This property does not prevent the control from
>>getting the focus, it only determines if the rectangle is visible when the control has the focus.
>>See the demo form.
>>
>>I decide to keep the naming convention as you had it, so that it's compatible with the CTL32
>>controls. I have renamed all the properties to remove the Hungarian notation.
>>
>>I think all that's left is the MaxRange property and the IncrementStyle (Small/Big change).
>>Want to take it from here?
>
>I just fixed a couple of bugs. Please redownload the ZIP


Ok, it's 1:26 my time, and I just submitted one last change. See the Demo form.
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform