|
-
Mar 23rd, 2003, 05:53 AM
#1
Thread Starter
Junior Member
Flexgrid problem
Hi! I have a flexgrid which I populate with values, now I want to be able to select a cell and change that value. In vb6 I made a floating textbox to do this trick because you cannot choose values directly(wonder why) now I want to do the same in vb.net but the flexgrid seem to use some strange coordinatesystem that doesnt match with the one in the form???? so how do I do this? or Is there any smarter way to do this? (perhaps using something else than flexgrid?)
-
Mar 23rd, 2003, 09:07 AM
#2
Ok, from what I have read, .Net does everything in Pixels, but the Flexgrid returns twips.
There are no built in functions to convert twips to pixels, but using a multiplier of 15 works on most displays.
Here is how you can get the textbox to move accordingly:
VB Code:
TextBox1.Top = FlexGrid1.Top + FlexGrid1.CellTop / 15
TextBox1.Left = FlexGrid1.Left + FlexGrid1.CellLeft / 15
TextBox1.Width = FlexGrid1.CellWidth / 15
TextBox1.Height = FlexGrid1.CellHeight / 15
Hope this helps,
-
Mar 23rd, 2003, 10:29 AM
#3
Thread Starter
Junior Member
thx then I get it... but another prob..
was looking at that, and I tryed to find a event for when I resize columns and rows.. but I really could not find any? (Im so noob) the closest I come was _SizeChanged but it only worked while scrollbar was on the flexgrid for some reason... so what to do?
-
Mar 27th, 2003, 03:24 PM
#4
Thread Starter
Junior Member
Suggestions?
Anyone got any suggestions?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|