User Tag List

Results 1 to 4 of 4

Thread: Please help with resizing DataGrid

  1. #1
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)

    Please help with resizing DataGrid

    I have decided to make an Array editor using the DataGrid object. Unfortunately, it seems to not resize properly. I have code that is supposed to resize the DataGrid horizontally based on the (Number of columns)*(Width of each column) and vertically based on the (number of lines)*(Height of each line). For some reason, this results in a DataGrid with a scrollbar and some empty background color generated as padding on the DataGrid. The actual DataGrid is being resized, but it isn't actually cropped to the cells I have created.

    Can someone take a look and point out where I am going wrong here? I am guessing it is just my lack of understanding how Windows controls behave.

    There is a sample array file also attached so you can load it and see the bug in action.
    Attached files Attached files

  2. #2
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)
    Is there anyone with DataGrid experience out there who can help with this? I was actually hoping to release this to the community as a tool for making and editing array files for projects.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    I assume there's a proper solution to this,
    but not being able to find it in some tries I made so far,
    here's a (possibly decent?) workaround:

    array_tool.mfa

    removing the datagrid border and making the background same color as the "framed" datagrid area
    and resizing to an additional line and column
    test file appears nicely on loading, and scrollbars appear in the correct moment when dragging window borders
    (if I've understood which was the main issue!)

    that's going to be a very useful tool, thanks for your work, btw

  4. #4
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the attempt. It definitely does work for resizing manually downward, but if you attempt to stretch the frame out, you will see the scrollbars stop one cell outside the last row/column visually.

    Also, I am trying to make a "resize to fit" feature, but the DataGrid size values appear to be incorrect when used to calculate the window size. At first I thought it might be that the DataGrid size was calculated at the end of the frame while the Window Control resized the window when the resize action is called. But I delayed the Window resizing a frame and it still didn't work. I think this might be a bug.

Similar Threads

  1. Datagrid object and other objects: Getting other objects to overlap datagrid order.
    By ratty in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 10th August 2013, 05:38 AM
  2. Datagrid Bug (2.)
    By Czentnar in forum Extension Development
    Replies: 12
    Last Post: 5th March 2010, 11:12 AM
  3. Datagrid bug
    By Czentnar in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 31st July 2009, 05:01 PM
  4. Need help with DataGrid
    By Richard_Pikk in forum File Archive
    Replies: 4
    Last Post: 29th August 2007, 08:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •