Author Topic: How to make configuration panel controls skinnable?  (Read 5976 times)

karaluh

  • Jr. Member
  • **
  • Posts: 26
I created a label and a check box but they are using default Windows appearance and not MusicBee skin. How can I change it? Below is the screenshot and code.

Code
                Label playCountSyncLabel = new Label();
                playCountSyncLabel.Location = new Point(0, 25);
                playCountSyncLabel.AutoSize = true;
                playCountSyncLabel.Text = "synchronise from ListenBrainz to your library on startup:";
                // Check box.
                playCountSyncCheckBox = new CheckBox();
                playCountSyncCheckBox.Location = new Point(0, 43);
                playCountSyncCheckBox.AutoSize = true;
                playCountSyncCheckBox.Text = "synchronise Play Count";

ListenBrainz plugin for MusicBee:
https://github.com/karaluh/ScrobblerBrainz

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 33134
their is a non-documented way that might work for text and combo boxes:
Code
control = MB_AddPanel(null, PluginPanelDock.TextBox);
control = MB_AddPanel(null, PluginPanelDock.ComboBox);
nothing was done for labels or checkboxes
but you can detect some skin colours
Code
Setting_GetSkinElementColour(SkinElement.SkinInputControl, ElementState.ElementStateDefault, ElementComponent.ComponentBackground);
use Color.FromArgb() to convert the number to a colour