Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Ribbon UI, wrong ordering of ribbon elements ?

Ribbon UI, wrong ordering of ribbon elements ?

Scheduled Pinned Locked Moved C / C++ / MFC
designcomgraphicshelpquestion
1 Posts 1 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Maximilien
    wrote on last edited by
    #1

    I am trying to order a set of buttons in a ribbon bar. The code below should create a ribbon with the layout (sorry bad paint drawing) See expected layout : [Ribbon Layout - Album on Imgur](http://imgur.com/a/FrG6r) But I get this : [Ribbon Layout - Album on Imgur](http://imgur.com/a/1MfCV) Where the 3 buttons (zoom window, zoom in and zoom out) are placed on the right of the gallery. I am not certain what I do wrong here, everything looks nicely coded ! Any insights, help, hints or tips ?

    m_wndRibbonBar.Create(this);

    CMFCRibbonCategory* category = m_wndRibbonBar.AddCategory(_TEXT("Test"), ITB_HOME_CATEGORY_16X16, ITB_HOME_CATEGORY_32X32 );

    CMFCRibbonPanel* panel = category->AddPanel(_TEXT("Stuff"));

    panel->Add(new CMFCRibbonButton(IDM_VIEW_ZOOM_ALL, _T("Zoom All"), 0, 0, FALSE));

    panel->AddSeparator();

    panel->Add(new CMFCRibbonButton(IDM_VIEW_ZOOM_WINDOW, _T("Zoom Window"), 1, -1, FALSE));
    panel->Add(new CMFCRibbonButton(IDM_VIEW_ZOOM_IN, _T("Zoom In"), 26, -1, FALSE));
    panel->Add(new CMFCRibbonButton(IDM_VIEW_ZOOM_OUT, _T("Zoom Out"), 27, -1, FALSE));

    panel->AddSeparator();

    CMFCRibbonGallery* viewRibbonGallery = new CMFCRibbonGallery(ID_HOME_VIEWS_RIBBON_BUTTON, _T("Views"), 7, 1, IDB_HOME_VIEWS_PALETTE_32X32, 32);
    panel->Add(viewRibbonGallery);
    panel->AddSeparator();

    // shaded...
    CMFCRibbonButtonsGroup* viewTypeGroup = new CMFCRibbonButtonsGroup;
    viewTypeGroup->AddButton(new CMFCRibbonButton(IDM_VIEW_MODE_NORMAL, _TEXT("Normal"), 20, FALSE));
    viewTypeGroup->AddButton(new CMFCRibbonButton(IDM_VIEW_MODE_SHADED, _TEXT("Shaded"), 21, FALSE));
    viewTypeGroup->AddButton(new CMFCRibbonButton(IDM_VIEW_MODE_WIREFRAME, _TEXT("Wireframe"), 22, FALSE));
    panel->Add(viewTypeGroup);

    CMFCRibbonButtonsGroup* wireFrameTypeGroup = new CMFCRibbonButtonsGroup;
    wireFrameTypeGroup->AddButton(new CMFCRibbonButton(IDM_VIEW_WIREFRAME_BOUNDARY, _TEXT("Boundary"), 23, FALSE));
    wireFrameTypeGroup->AddButton(new CMFCRibbonButton(IDM_VIEW_WIREFRAME_ISOLINE, _TEXT("Isoline"), 24, FALSE));
    wireFrameTypeGroup->AddButton(new CMFCRibbonButton(IDM_VIEW_WIREFRAME_MESH, _TEXT("Mesh"), 25, FALSE));
    panel->Add(wireFrameTypeGroup);

    I'd rather be phishing!

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups