Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Control's anchor property doesn't work in Fox9

Status
Not open for further replies.

dk2006

MIS
Jan 19, 2006
53
US
I am fustrated with Anchor property in Fox9. I doesn't seem to work. For example, I have an image on the top right hand corner. I want it to anchor to top right hand corner. On the Anchor property setup screen, I select Top and Right. The result, my image is displayed at top left hand corner but bound to the top right hand corner. I'm confused. It's not as easy as VB.NET.

Anyone has any idea?

Thank you,
dk
 
I have to set ShowWindow property to 0 (In Screen) to get it to work.
 
The only problem is I need to set my ShowWindow property ot 2 in order to get rid of FoxPro environment screen. How can I get around this?
 
dk2006,

Are you saying that the following doesn't work for you? (cut-n-paste the code below into a VFP prg and execute it)

Code:
PUBLIC goForm as form
goForm = CREATEOBJECT("Form1")
WITH goForm
	.Addobject("Image1", "Image")
	WITH .Image1
		.picture=HOME(4) + "BITMAPS\ASSORTED\BEANY.BMP"
		.move(.parent.width - .width, 0, .width, .height)
		.Anchor = 9
		.visible = .T.
	ENDWITH
	.Show()
ENDWITH

DEFINE CLASS Form1 as Form
	ShowWindow = 2
ENDDEFINE

When I run that the image shows up in the upper right-hand corner of the form and stays there even when the form is resized.

boyd.gif

SweetPotato Software Website
My Blog
 
DK,

What (numeric) values are you actually setting the anchor to?

Assuming you don't want to resize the image, I would guess that you should be setting it to 144. I suggest you ignore the anchor builder screen, and just try that number.

By the way, chaning the ShowWindow property shouldn't make any difference one way or the other, as far as I know.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top