Fix XCLabel Background Color issue on Volume Panel by Using XCEdit Object and Set ReadOnly Flag ...

This commit is contained in:
2024-10-03 12:31:55 +03:30
parent 3c6d16e953
commit 5973bf89c8
2 changed files with 16 additions and 2 deletions
@@ -166,6 +166,16 @@ class XCEdit : public XCObject
ObjectSetString(mChartID, mName, OBJPROP_FONT, value); ObjectSetString(mChartID, mName, OBJPROP_FONT, value);
} }
/**
* Set ReadOnly State of Object ...
*
* @param value: boolean value
*/
void ReadOnly(bool value)
{
ObjectSetInteger(mChartID, mName, OBJPROP_READONLY, value);
}
// //
// Protected ... // Protected ...
protected: protected:
+6 -2
View File
@@ -234,7 +234,7 @@ bool eaUseForceMomentumProtecting = eaUseForceMomentumsInProtection;
XCPanel eaVolumePanel; XCPanel eaVolumePanel;
XCButton eaDynamicVolumeBtn; XCButton eaDynamicVolumeBtn;
XCEdit eaStaticVolumeTb; XCEdit eaStaticVolumeTb;
XCLabel eaStaticVolumeLbl; XCEdit eaStaticVolumeLbl;
XCButton eaSetStaticVolumeBtn; XCButton eaSetStaticVolumeBtn;
XCButton eaResetStaticVolumeBtn; XCButton eaResetStaticVolumeBtn;
double eaAppliedStaticVolume = eaVolume; double eaAppliedStaticVolume = eaVolume;
@@ -2112,15 +2112,19 @@ bool InitVolumeGUI()
result = eaStaticVolumeLbl.Create( result = eaStaticVolumeLbl.Create(
eaStaticVolumeLblName, eaStaticVolumeLblName,
10, 10,
275 // 275,
150,
25 //
); );
if (!result) if (!result)
{ {
return result; return result;
} }
eaStaticVolumeLbl.FontSize(10); eaStaticVolumeLbl.FontSize(10);
eaStaticVolumeLbl.ReadOnly(true);
eaStaticVolumeLbl.Color(clrWhite); eaStaticVolumeLbl.Color(clrWhite);
eaStaticVolumeLbl.Text("Static Volume: "); eaStaticVolumeLbl.Text("Static Volume: ");
eaStaticVolumeLbl.BGColor(clrMediumSlateBlue);
eaVolumePanel.Add(eaStaticVolumeLblName); eaVolumePanel.Add(eaStaticVolumeLblName);
// //