This is sort of complicated but I'll try to explain as best as possible.
I have an array of Text Boxes "tb()", It resizes when I add a new one and removes one when I take one away.
Now when I add them, I attach the controls to a panel that I have on my form "Panel1". So In essence it looks like this:
#################
# tb1 tb2 tb3 tb4 + - #
# < -[ ]-------------> #
#################
Now, I have limited space to use so I have the scroll set to auto expecting when it stretches the panel control it will deal with it appropriately. I align the text boxes based on the amount of total text boxes and a certain with.
vb.net Code:
tb1.location = tbCount * 54
then it draws the + - buttons..
Now, for the problem.. After adding a few text boxes the position of the boxes work appropriately until it starts to scroll. It is not reading the correct position and it shoots each new text box out about 30 extra units each time. It is not reading the correct 0 location, and my assumption is that it is reading it from the edge of the present box and not the original Panel origin.vb.net Code:
plusB.location = lastX + 59 ' Spaces it based on the last x coordinate and then a few space between the boxes
Any help would be much appreciated.




Reply With Quote