VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MSFlexGrid & TextBox issue

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
256 Views, 4 Replies

MSFlexGrid & TextBox issue

how to align these 2 controls?

seems the coordinate system of these 2 controls are not the same, how to solve it?

normally, it should be coded like this:
TextBox1.Left = MSFlexGrid1.Left + MSFlexGrid1.CellLeft
TextBox1.Top = MSFlexGrid1.Top+ MSFlexGrid1.CellTop
TextBox1.Width = MSFlexGrid1.CellWidth
TextBox1.Height = MSFlexGrid1.CellHeight
4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: Anonymous

i figured out w/ coordinate system which should like:
TextBox1.Left = MSFlexGrid1.Left + MSFlexGrid1.CellLeft / 20
TextBox1.Top = MSFlexGrid1.Top+ MSFlexGrid1.CellTop / 20
TextBox1.Width = MSFlexGrid1.CellWidth / 20
TextBox1.Height = MSFlexGrid1.CellHeight / 20

but i cannot set focus which i used:
TextBox1.Visible = True
TextBox1.SetFocus

i tried TextBox1.ZOrder & MSFlexGrid1.ZOrder but didn't work, any ideas?
Message 3 of 5
Anonymous
in reply to: Anonymous

Use tab index.
Message 4 of 5
Anonymous
in reply to: Anonymous

doesn't work Rashlak.
it happens only at VBA, seems AutoDesk guys doesn't care much of full VBA implementation model, no topology, no this, no that, ...
thanks anyway.
Message 5 of 5
Anonymous
in reply to: Anonymous

It has nothing to do with Autodesk. You are not legally allowed to use the
MSFlexGrid in VBA per Microsoft.

-- Mike
___________________________
Mike Tuersley
___________________________
the trick is to realize that there is no spoon...

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost