Many thanks, I added default size and pos and it now works, just wouldn't let me feed it nothing in those areas, should have tried values, I guess I spent too long in front of the screen.
Also thanks to Mark Dootson for assistance. Peter -----Original Message----- From: bungsuputra linan [mailto:[EMAIL PROTECTED] Sent: 23 September 2007 14:47 To: Peter Wilson Cc: [email protected] Subject: Re: Wx::DatePicker Peter Wilson wrote: > Hi > > Can anyone help, how can I pass a style to the datepicker I have > > $this->{releaseDate} = Wx::DatePickerCtrl->new( $panel, -1 ); > > Which shows the date and some spinners however I would like a drop down > calendar , but when I try and pass it a style to have a dropdown > (wxDP_DROPDOWN) it fails. I am using ms windows xp, perl v5.8.2 and Wx > [0.73.1.14]. > > Many thanks > > Peter > > For info I have tried. > > $this->{releaseDate} = Wx::DatePickerCtrl->new( $panel, -1, , , , > wxDP_DROPDOWN ); > > And it fails telling me this: > > the invocant must be a reference at ... <the line of code above> > > > I tried the demo and changed the style to wxDP_DROPDOWN and it worked. You can try: my $date = Wx::DateTime->newFromDMY( 8, 0, 1979, 1, 1, 1, 1 ); $this->{releaseDate} = Wx::DatePickerCtrl->new($panel, -1, $date, [-1,-1], [-1,-1], wxDP_DROPDOWN); Regards, bungsu
