• Moderator
    Kronos
    Posts: 2242 from 2003/2/24
    Code:

    struct Data *data,t;
    obj = (Object*)DoSuperNew(cl,obj,
    MUIA_Window_ID, MAKE_ID('M','A','I','N'),
    MUIA_Window_UseRightBorderScroller, TRUE,
    MUIA_Window_UseBottomBorderScroller, TRUE,
    MUIA_Window_Title, GetString(MSG_DisplayWindow_Title),
    MUIA_Window_Menustrip , MUI_MakeObject(MUIO_MenustripNM,displaywindowmenu,MUIO_MenustripNM_CommandKeyCheck),
    WindowContents,
    HGroup,
    Child, t.hscroller = ScrollbarObject,
    MUIA_Prop_Horiz,TRUE,
    MUIA_Prop_UseWinBorder, MUIV_Prop_UseWinBorder_Bottom,
    MUIA_Prop_Slider,TRUE,MUIA_Prop_Visible,10, MUIA_Prop_Entries,2000,
    End,
    Child, t.vscroller = ScrollbarObject,
    MUIA_Prop_Horiz,FALSE,
    MUIA_Prop_UseWinBorder, MUIV_Prop_UseWinBorder_Right,
    MUIA_Prop_Slider,TRUE,MUIA_Prop_Visible,1000, MUIA_Prop_Entries,2000,
    End, ......


    /me has subclasses MUIC_Window here passing those 2 attributes to normal window-class-object should have same effect... both scrollobjects should be children of the window (or one of it's groups).

    Code:


    DoMethod(data->display,MUIM_Notify,MA_Display_VisibleWidth,MUIV_EveryTime,data->hscroller,3,MUIM_Set,MUIA_Prop_Visible,MUIV_TriggerValue);
    DoMethod(data->display,MUIM_Notify,MA_Display_VisibleHeight,MUIV_EveryTime,data->vscroller,3,MUIM_Set,MUIA_Prop_Visible,MUIV_TriggerValue);
    DoMethod(data->display,MUIM_Notify,MA_Display_FullWidth,MUIV_EveryTime,data->hscroller,3,MUIM_Set,MUIA_Prop_Entries,MUIV_TriggerValue);
    DoMethod(data->display,MUIM_Notify,MA_Display_FullHeight,MUIV_EveryTime,data->vscroller,3,MUIM_Set,MUIA_Prop_Entries,MUIV_TriggerValue);


    DoMethod(data->hscroller,MUIM_Notify,MUIA_Prop_First,MUIV_EveryTime,data->display,3,MUIM_Set,MA_Display_HorizOffset,MUIV_TriggerValue);
    DoMethod(data->vscroller,MUIM_Notify,MUIA_Prop_First,MUIV_EveryTime,data->display,3,MUIM_Set,MA_Display_VertOffset,MUIV_TriggerValue);



    Should be all you need ;)
  • »06.02.12 - 18:42
    Profile