Hello,
I have a button on a page in a pageframe. The button is in a CommandGroup. The button has an image and text on it. When this button is clicked, it changes the ActivePage of the pageframe. When nothing is visible in the location on the new page, the text and image remain.
When the mouse is hovering the button, and the space bar is pressed, the text and image appear after moving the mouse. This happens if there is something over the button or not.
Has anyone noted this behavior? Does anyone have a workaround?
Thank you, Tracy
I remember something about ghosted images on a pageframe. I think what you need to do is in the init of the pageframe, is to make each page active from last-to-first before setting whatever the correct active page should be. You can use LockScreen property so you don't "see" the pages flashing by.
Fred
On Tue, Jun 20, 2017 at 9:13 AM, Tracy Pearson tracy@powerchurch.com wrote:
Hello,
I have a button on a page in a pageframe. The button is in a CommandGroup. The button has an image and text on it. When this button is clicked, it changes the ActivePage of the pageframe. When nothing is visible in the location on the new page, the text and image remain.
When the mouse is hovering the button, and the space bar is pressed, the text and image appear after moving the mouse. This happens if there is something over the button or not.
Has anyone noted this behavior? Does anyone have a workaround?
Thank you, Tracy
[excessive quoting removed by server]
Fred Taylor wrote on 2017-06-20:
I remember something about ghosted images on a pageframe. I think what
you
need to do is in the init of the pageframe, is to make each page active from last-to-first before setting whatever the correct active page should be. You can use LockScreen property so you don't "see" the pages
flashing
by.
Fred
Fred,
I remember that being a fix for ActiveX control issues.
This is a multistep wizard. These pages have already been active by the time the behavior shows up.
I just found a workaround when I noticed my emails. In the Click event, set the Command.Visible = .F.. In the CommandGroup.UIEnable, set the Command.Visible = .T. , when lEnable = .T..
Tracy Pearson PowerChurch Software
I definitely saw the ghosting with VFP controls, but just the ListBox and EditBox IIRC. Don't have access to that code now, so I can't check.
Glad you found a fix.
Fred
On Tue, Jun 20, 2017 at 11:51 AM, Tracy Pearson tracy@powerchurch.com wrote:
Fred Taylor wrote on 2017-06-20:
I remember something about ghosted images on a pageframe. I think what
you
need to do is in the init of the pageframe, is to make each page active from last-to-first before setting whatever the correct active page
should
be. You can use LockScreen property so you don't "see" the pages
flashing
by.
Fred
Fred,
I remember that being a fix for ActiveX control issues.
This is a multistep wizard. These pages have already been active by the time the behavior shows up.
I just found a workaround when I noticed my emails. In the Click event, set the Command.Visible = .F.. In the CommandGroup.UIEnable, set the Command.Visible = .T. , when lEnable = .T..
Tracy Pearson PowerChurch Software
[excessive quoting removed by server]
On Tue, Jun 20, 2017 at 12:13 PM, Tracy Pearson tracy@powerchurch.com wrote:
Has anyone noted this behavior?
Yes, iirc from decades ago. You're running code in a Button.Click() event, and the button has default behaviors of repainting as a DownPicture and executing the code, and then repainting the UpPicture, so it can get redrawn even as the rug (in this case the pageframe) is pulled out from underneath it.
Does anyone have a workaround?
Now, for the tough part. This part I don't recall. I'm thinking you could do something like call a PageFrame custom method passing the desired page, sets a timer for a tenth of a second to reset the ActivePage and return to the button. Once it's done repainting, the page should switch. But that's really hacky.
Or maybe just try NODEFAULT in the Button.Click()
Or LockScreen()?
Ted Roche wrote on 2017-06-20:
On Tue, Jun 20, 2017 at 12:13 PM, Tracy Pearson tracy@powerchurch.com
wrote:
Has anyone noted this behavior?
Yes, iirc from decades ago. You're running code in a Button.Click() event, and the button has default behaviors of repainting as a DownPicture and executing the code, and then repainting the UpPicture, so it can get redrawn even as the rug (in this case the pageframe) is pulled out from underneath it.
Does anyone have a workaround?
Now, for the tough part. This part I don't recall. I'm thinking you could do something like call a PageFrame custom method passing the desired page, sets a timer for a tenth of a second to reset the ActivePage and return to the button. Once it's done repainting, the page should switch. But that's really hacky.
Or maybe just try NODEFAULT in the Button.Click()
Or LockScreen()?
Ted,
Thank you.
I did try the Timer thing. A BindEvent solution. A combination of the two. The Mouse over the control, press the spacebar, everything triggers, move the mouse and the ghost appeared.
The Button.Click() calls a method on the Form. That was the only line of code in it.
Tried the LockScreen around the call in the Button.Click(). The ghost still appeared.
Tracy Pearson PowerChurch Software