Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date/Time Picker on a Toolbar
Message
 
To
03/05/2000 04:18:25
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00365095
Message ID:
00365562
Views:
16
>>>>Has anyone ever tried placing the MS Date/Time Picker control on a toolbar? When I place one on a toolbar, it's as if it is disabled, but it's not. It looks enabled, but you cannot drop it down or do anything with it.
>>>>
>>>>Any information is appreciated.
>>>
>>>
Doug,
>>>It works in a toolbar too. Maybe it's really disabled. You could "copy" it on a test form to see if it works there.
>>>Cetin
>>
>>Cetin,
>>Kind of weird... but my control isn't disabled. I've tried just directly dropping an OLE Control and selected the Date/Time Picker and that didn't work. I've tried creating a class that is an OLE Control where I selected the Date/Time Picker and then dropped that on the toolbar and that didn't work either. I also have a class that dynamically creates the Date/Time Picker control at run time (work around so that I always know that I won't have a conflict with my control in regards to versions), and I dropped this on the toolbar with the same result.
>>
>>The control "looks" like it will work. It looks enabled, and has a date that is visible, but when I try to click on it, nothing. It's as if there is something in front of the control, but there isn't.
>>
>>How were you able to add the control to a toolbar? Did you verify that you could drop it down and select a date?
>>
>>Thanks for your input.
>
>
Doug,
>For a quick test to your question all I did was :
>-Create a class based on toolbar
>-From controls select activex
>-Drag&drop dtpicker on toolbar and size it a little
>-Save
>-Create a test form with a custom oToolbar property
>-In init added code
>this.oToolbar = newobject("myToolbar","myTest.vcx")
>this.oToolbar.show()
>
>I ran it afterwards and I could dropdown and select dates.
>
>Do you use a container for it ? If so you might need to size conatiner dynamically. If it "seems" to be working try to press arrows for a couple of times and press enter. The date it shows should change if that's a "viewport" problem. It happened to me with container and now I size my container calculating where on the form it could expand.
>Cetin

Cetin,

Thanks for your help. I figured out the problem, but I'm not sure I like the end result. In your example, try making your form modal. If your form is modal, the Date/Time Picker doesn't work.

Don't ask why my form is modal... it's a long story. Anyway, thought I would pass the information on.

Thanks again.

Doug Stalter

"According to the proverb, the best things are the most difficult." -Plutarch
Previous
Reply
Map
View

Click here to load this message in the networking platform