pl: VFP 8.0 SP1
Hello !
I've a little problem.
I try to create a new class - e.g. myViewer based on a container and add GdViewer as object in it.
The problem is- if i placed it on an Form and run the objekt (Container) is visible but not GdViewer ???
TestForm.oImage.oGdViewer.Visible = .F.
TestForm.oImage.oGdViewer.Visible = .T.
GdViewer is shown, otherwise i click in the object (Container) the GdViewer object also shown
I've try to set Visible off/on in the Init-Event from the Container oder GdViewer but nothing helps ...
No GdViewer-method helps (e.g. displayfromfile or refresh)
i hope, anybody can help me - please - this time must be ...
mike (germany, sorry for the verry bad english)
VFP VCL CLASS Container
Re: VFP VCL CLASS Container
Hi,
This is a focus problem from vfp.
Into the init method of your class based on a container add this line:
OleControl1 is the name of the GdViewer object.
Also, I suggest you to add this line too:
Best regards,
Loïc
This is a focus problem from vfp.
Into the init method of your class based on a container add this line:
Code: Select all
this.olecontrol1.SetFocus()
Also, I suggest you to add this line too:
Code: Select all
application.AutoYield = .F.
Loïc
Re: VFP VCL CLASS Container
Merci Loïc,
for the very fast help !
Your solution works, but i will not manipulate the focus ...
so i had found an other way to fix the problem:
'Container'.Refresh:
if This.pFirstInit
xVisible = This.oGdViewer.Visible
This.oGdViewer.Visible = .f.
This.oGdViewer.Visible = .t.
This.oGdViewer.Visible = xVisible
This.pFirstInit = .f.
endif
thanks and a nice weekend
Mike
for the very fast help !
Your solution works, but i will not manipulate the focus ...
so i had found an other way to fix the problem:
'Container'.Refresh:
if This.pFirstInit
xVisible = This.oGdViewer.Visible
This.oGdViewer.Visible = .f.
This.oGdViewer.Visible = .t.
This.oGdViewer.Visible = xVisible
This.pFirstInit = .f.
endif
thanks and a nice weekend
Mike
Who is online
Users browsing this forum: No registered users and 1 guest