Results 1 to 4 of 4

Thread: Flexgrid problem

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2001
    Posts
    30

    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?)

  2. #2
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367
    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:
    1. TextBox1.Top = FlexGrid1.Top + FlexGrid1.CellTop / 15
    2.         TextBox1.Left = FlexGrid1.Left + FlexGrid1.CellLeft / 15
    3.         TextBox1.Width = FlexGrid1.CellWidth / 15
    4.         TextBox1.Height = FlexGrid1.CellHeight / 15

    Hope this helps,

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Nov 2001
    Posts
    30

    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?

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Nov 2001
    Posts
    30

    Question 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
  •  



Click Here to Expand Forum to Full Width