Forum  Commercial Foru...  Commercial Foru...  DateTime Picker and nulls
Previous Previous
 
Next Next
New Post 4/4/2011 6:57 AM
  sramirez@dynacal.com
508 posts
1st Level Poster


Re: DateTime Picker and nulls 

I took a look at the new code you put out there and it works.  However, in my case I can't use it because of the checkbox that shows up when it is null.  My team has told me that I have to find another way because they don't like the look/feel of it.

So, I have played around with creating a control that consists of a masked textbox and a monthpicker (each inside a seperate panel).  The panels are docked=top.  There is also a picturebox with a dropdown image.  When the user clicks on the image, the usercontrol does a me.height = 152 and makes the panel with the monthpicker visible.  When the user selects a date, the panel is marked as visible = false and the me.height = 22 (the date is put into the masked textbox also).

This allows  pretty close functionality to the nullable datetime picker but doesn't have the checkbox show when it is null.  It also allows for the user to wipe the textbox with the delete key and see "no date" as "empty", which is what our users are used to seeing.

This works except in the following case:

The usercontrol is in a panel that is say 30px in height and there is another panel below this.  When the picturebox dropdown is pressed, the usercontrol "grows" but can't be seen completely because the parent panel of the usercontrol isn't big enough to show the whole thing.

Is there a way to make the usercontrol "grow" outside its parent panel?

You can see it here: http://screencast.com/t/ZTsVIN1Yd8H

I didn't try inheriting from the combobox because my understanding was that I couldn't change way the "textbox" of the combobox acts.

Thanks for any help you can give me.

Shawn

 
New Post 4/4/2011 12:56 PM
  palli
14415 posts
1st Level Poster




Re: DateTime Picker and nulls 

Hi Shawn,

I don't think you can have the UserControl grow outside of it's panel, unless you revert to some JavaScript custom programming. You may be able to accomplish something in this direction with smart overlaying/underlaying of non-docked panel, but I'm not sure you would quite get what you are looking for. You may also be able to use popups when the dropdown arrow is pressed.

For your information, the most recent versions of Visual WebGui have MaskedComboBox. Don't know if you already tested that.

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 4/4/2011 6:00 PM
  sramirez@dynacal.com
508 posts
1st Level Poster


Re: DateTime Picker and nulls 

Thanks, I didn't know about the masked combo.  I will give that a try.

Shawn

 
New Post 4/5/2011 10:19 AM
  sramirez@dynacal.com
508 posts
1st Level Poster


Re: DateTime Picker and nulls 

I have a sample project for the masked combobox.  http://www.mediafire.com/file/fcvrzdtxq0d1t74/VWGMaskedCombo.7z

I have a simple maskedcombo.

        Me.MaskedComboBox2.BorderStyle = Gizmox.WebGUI.Forms.BorderStyle.Fixed3D
        Me.MaskedComboBox2.CustomStyle = "M"
        Me.MaskedComboBox2.FormattingEnabled = True
        Me.MaskedComboBox2.Items.AddRange(New Object() {"1/1/2001", "2/1/2010"})
        Me.MaskedComboBox2.Location = New System.Drawing.Point(109, 159)
        Me.MaskedComboBox2.Mask = "00/00/0000"
        Me.MaskedComboBox2.MaxDropDownItems = 8
        Me.MaskedComboBox2.Name = "MaskedComboBox2"
        Me.MaskedComboBox2.Size = New System.Drawing.Size(83, 21)
        Me.MaskedComboBox2.TabIndex = 4

The problem is that when i run it,  I don't get the mask.  I do not see formatting and I am not restricted in what I put in there.  So I could put a "aa" and it take it. 

I would think that it would work like the masked textbox and show the mask and limit what is placed in the combo.

In addition to this problem, I have a question.  Can I take this masked combo, and just like the normal combo, us it as the base for a control that shows a custom drop down?  I am thinking if I could do this, I could have the masked date (which would allow me to have an empty <null> value and also allow the user to do a dropdown to a monthpicker.  I am doing this with the standard combobox for a timepicker using "Inherits Gizmox.WebGUI.Forms.ComboBox"

thanks,

Shawn

 
New Post 4/5/2011 2:32 PM
  palli
14415 posts
1st Level Poster




Re: DateTime Picker and nulls 

Hi Shawn,

Testing your application here either in 6.4.0 Release b or c, the mask works fine. Caching is the most likely cause, as I did notice that the privateversion for the project is still at 1, and the project is not set to disable caching, which is a good practice during development.

Regarding the custom dropdown question, then the MaskedComboBox inherits from ComboBox, so the custom dropdown should work fine, as with the Combobox.

Hope this helps,

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
Previous Previous
 
Next Next
  Forum  Commercial Foru...  Commercial Foru...  DateTime Picker and nulls
.NET HTML5 Web, Cloud and Mobile application delivery | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2012 Visual WebGui®       Visual WebGui weblog on ASP.NET Gizmox Blog Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS