Plex 2E

 View Only
  • 1.  Grid horizontal scroll bar missing

    Posted Jan 04, 2019 05:42 AM

    Hi, hope someone can help me. 

     

    I have multiple grids on one panel that are displayed and hidden by pressing a button. (Simulating the use of tabs because we have lots of data that don't fit on the panel)

    Say for example there are 3 tabs Tab1, Tab2 and Tab3 to display grid1, grid2 and grid3 data. When I press the Tab1 button to display grid1 data and then Minimize and Maximize the panel, the horizontal scroll bars on Tab2 and Tab3 are missing. When I then press Tab2 to display grid2 data and then Minimize and Maximize the panel, the horizontal scroll bars on Tab1 and Tab3 are missing. The same issue when I press Tab3 button.

    I found that when I use the grid property Fix Bottom = Yes I get the above issue.

     

    So we have a workaround (Minimize and maximize the panel) to scroll left to right in the grids for now.

     

    Anyone with the same issue?



  • 2.  Re: Grid horizontal scroll bar missing

    Posted Jan 04, 2019 10:21 AM

    back in the day I used to use source code to redraw to window when things went missing

     

     

    in stellatools if you are interested



  • 3.  Re: Grid horizontal scroll bar missing
    Best Answer

    Posted Jan 04, 2019 10:23 AM

     

    HWND TEMP = ObPanelAPI::GetPanelHandleByName("*Current");
    InvalidateRect(TEMP,NULL,TRUE);

     

     

    {
    HWND TEMP = ObPanelAPI::GetPanelHandleByName("*Current");
    if (!IsIconic(TEMP))
    {
    SetWindowPos(TEMP,HWND_TOP, 0,0,0,0,SWP_NOZORDER|SWP_SHOWWINDOW|SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOMOVE|SWP_FRAMECHANGED);
    }
    }

     

     

    // Refreshing the Panel - Desynit_Hints and Tips.pdf
    // This source code is very useful when you are using the Progress ActiveX control
    // and you want to update, say, a record count on the screen whilst a background process
    // is running. Without using this API you would find that the panel never get's updated
    // until the Progress bar has completed which is obviously a bit late.

    {
    // Create a reference to the panel
    CWnd *pWnd = ObPanelAPI::GetPanelCWndByName("*Current");
    ASSERT(pWnd);
    if (pWnd)
    // Refresh the panel
    pWnd->UpdateWindow();
    }