Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

CToolBarCtrl::HideButton

Empfohlene Antworten

Hallo,

in meiner Anwendung verstecke ich bzw. zeige ein Button im Toolbar an. Und das funktioniert auch mit der Zeile:

m_wndToolBar.GetToolBarCtrl().HideButton(ButtonID, bool)

Da vor und nach dem Button ein vertikales Trennstrich steht, werden es nach dem Verstecken 2 Trennstriche.

Wie kann ich einen Trennstrich "mitentfernen" bzw. "miterstellen"?

Gruß

aifl :)

Habe das Problem so gelöst:

RemoveToolbarBtn(bool bRemove)
{
int index = m_wndToolBar.GetToolBarCtrl().CommandToIndex(ButtonID);
index++; //Index des nach dem Button kommenden Separators
if(bRemove){
if( !m_wndToolBar.GetToolBarCtrl().IsButtonHidden(ButtonID) )
{
m_wndToolBar.GetToolBarCtrl().HideButton(ButtonID, true);
if( m_wndToolBar.GetButtonStyle(index) == TBBS_SEPARATOR )
m_wndToolBar.GetToolBarCtrl().DeleteButton(index);
}
}
else{
if( m_wndToolBar.GetToolBarCtrl().IsButtonHidden(ButtonID) )
{
m_wndToolBar.GetToolBarCtrl().HideButton(ButtonID, false);
TBBUTTON tbb;
tbb.fsStyle = TBSTYLE_SEP;
tbb.fsState = TBSTATE_ENABLED;
m_wndToolBar.GetToolBarCtrl().InsertButton(index,&tbb);
}
}
}
[/PHP]

Gruß

aifl :)

P.S.

Zum Schluß ist noch ein

RecalcLayout(FALSE);

nicht verkehrt.

aifl ;)

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.