Groupbox and datetimepicker

Am I the only one who use a disclosure for DateTimePicker ? From graphical view to text view ?

When you switch between graphical view and text view in a groupbox, the graphical view won’t show on the top of the groupbox and get cropped

Screen Shot 2022-04-03 at 7.26.37 PM
Screen Shot 2022-04-03 at 7.26.33 PM
Screen Shot 2022-04-03 at 7.26.26 PM

Hi @Etienne_Pilon

That is the expected behavior. You added the DateTimePicker as a child of the GroupBox in the Layout Editor, so when you change it from text to graphical view… it keeps the top/left coordinates and the view is still embedded in the GroupBox and, thus, restricted by its bounds.

You should be able to set its Parent to Nil in the Open event of the DateTimePicker.

1 Like

You need to adjust the height of the GroupBox in the PopupArrow’s MouseUp event - presumably you’re already returning true in MouseDown. Simply set an appropriate height for when it’s in text mode and a different height if the user has changed to graphical mode. Something like:

if DateTimePicker1.GraphicalDisplay = true then
  DateTimePicker1.GraphicalDisplay = false
  GroupBox1.Height = 74
else
  DateTimePicker1.GraphicalDisplay = true
  GroupBox1.Height = 200
end if

I would expect the behavior like a popup menu… goes on top of everything…

Nope, it doesn’t work that way :slight_smile:

1 Like

Einhugur’s DateControl is the only control with a dropdown calendar. The calendar is even a decent size and not the tiny one of macOS:

1 Like

I saw that ! but like Beatrix shows us, this is a “datepicker”

That what i expexted for a datepicker

Oh, i just was replying to your original question.

A native DateTimePicker doesn’t behaves the way that you expect. That’s all. :slightly_smiling_face:

This is why it’s wrong !