wxDateProperty spin button disappears in wxPropertyGrid

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
colleen
In need of some credit
In need of some credit
Posts: 6
Joined: Tue Sep 18, 2018 12:38 pm

wxDateProperty spin button disappears in wxPropertyGrid

Post by colleen »

Hi
I have a wxDateProperty in a wxPropertyGrid but when I click on the up arrow button a few times in a row the down arrow button disappears. The button is still there because if I move the cursor over the spot where it should be it reappears. This does not happen the other way around (if I click on the down arrow a few times in a row the up arrow is fine). Why is this happening and how do I prevent it?

Code: Select all

wxPropertyGrid *m_PropertyGrid = new wxPropertyGrid( this );
wxPGProperty *ipProperty = new wxDateProperty();
m_PropertyGrid->AppendIn( ipProperty );
Attachments
wxDatePropertyArrows.png
wxDatePropertyArrows.png (5.28 KiB) Viewed 1039 times
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7480
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxDateProperty spin button disappears in wxPropertyGrid

Post by ONEEYEMAN »

Hi,
What is your OS/toolkit?
What wx version do you use?
How did you compile/configure wxWidgets?
I presume it is reproducible in the propgrid sample?

Thank you.
colleen
In need of some credit
In need of some credit
Posts: 6
Joined: Tue Sep 18, 2018 12:38 pm

Re: wxDateProperty spin button disappears in wxPropertyGrid

Post by colleen »

I am using Windows 10, wxWidgets 3.1. I am using Visual Studio 2017.
I can reproduce it in the sample.
Attachments
samplewxDateProperty.png
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7480
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxDateProperty spin button disappears in wxPropertyGrid

Post by ONEEYEMAN »

Hi,
Did you change a sample or a library in any way?
How many times should I press the key to see the effect?
Do you have access to the older Windows version -either for VM or a real install?

Thank you.
colleen
In need of some credit
In need of some credit
Posts: 6
Joined: Tue Sep 18, 2018 12:38 pm

Re: wxDateProperty spin button disappears in wxPropertyGrid

Post by colleen »

The only think I changed in the sample was the style of date picker so that it is the two button arrows rather than the drop down calendar.

Code: Select all

pg->SetPropertyAttribute( wxT( "DateProperty" ), wxPG_DATE_PICKER_STYLE, wxVariant( 1 ) );
in the propgrid.cpp file.
The number of times the arrow button needs to be clicked seems to be kind of random. Sometimes it's on the second click and sometimes not until the seventh or eighth.
The problem was also tested on Windows 7 and the issue appeared there too.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7480
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxDateProperty spin button disappears in wxPropertyGrid

Post by ONEEYEMAN »

Hi,
Is the key press works - i.e. can you press the down arrow key and get an expected results?
I'm looking for whether it is just a repainting issue or a more seriou8s one?

But in any case you should open a ticket on the trac.wxwidgets.org. Or send an e-mail to the wx-dev ML.

Thank you.
colleen
In need of some credit
In need of some credit
Posts: 6
Joined: Tue Sep 18, 2018 12:38 pm

Re: wxDateProperty spin button disappears in wxPropertyGrid

Post by colleen »

Arrow keys work fine. The numbers decrease/increase and the buttons are always there as expected. The number keys work too to edit individual portions of the date.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7480
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxDateProperty spin button disappears in wxPropertyGrid

Post by ONEEYEMAN »

Hi,
Ok, what happens if you start the sample and press the down arrow couple of times. Will up arrow disappear?

Thank you.
colleen
In need of some credit
In need of some credit
Posts: 6
Joined: Tue Sep 18, 2018 12:38 pm

Re: wxDateProperty spin button disappears in wxPropertyGrid

Post by colleen »

Pressing the down arrow doesn't cause a problem (the up arrow remains visible as expected). It is only a problem clicking the up arrow that the down arrow disappears.
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4204
Joined: Sun Jan 03, 2010 5:45 pm

Re: wxDateProperty spin button disappears in wxPropertyGrid

Post by PB »

I can confirm this with git master head and Windows 10 (regular DPI) in the propgrid sample, changing the line to

Code: Select all

pg->SetPropertyAttribute( wxT("DateProperty"), wxPG_DATE_PICKER_STYLE, (long)wxDP_SPIN);
If it can be reproduced it is a bug, however minor. So you should probably report it on wxTrac, assuming it is not already there.
colleen
In need of some credit
In need of some credit
Posts: 6
Joined: Tue Sep 18, 2018 12:38 pm

Re: wxDateProperty spin button disappears in wxPropertyGrid

Post by colleen »

The problem is still there.

I will report it.
Post Reply