{
listBox.background = background;
};
+ watch(selectionColor)
+ {
+ listBox.selectionColor = selectionColor;
+ };
+ watch(selectionText)
+ {
+ listBox.selectionText = selectionText;
+ };
public:
property bool activeStipple
get { return style.showNone; }
}
property Color selectionColor { set { selectionColor = value; } get { return selectionColor; } isset { return selectionColor ? true : false; } };
+ property Color selectionText { set { selectionText = value; } get { return selectionText; } isset { return selectionText ? true : false; } };
property bool changeContents
{
set { style.changeContents = value; }
if(!isEnabled)
surface.SetForeground(Color { 85,85,85 } );
else
- surface.SetForeground((active && style.activeColor && !pulledWindow /*listBox.visible*/) ? SELECTION_TEXT : foreground);
+ surface.SetForeground((active && style.activeColor && !pulledWindow /*listBox.visible*/) ? selectionText : foreground);
surface.TextOpacity(true);
if(currentRow)
EditBox editBox;
Alignment alignment;
DataRow noneRow;
- Color selectionColor;
+ ColorAlpha selectionColor, selectionText;
+
+ selectionColor = SELECTION_COLOR;
+ selectionText = SELECTION_TEXT;
};
int caretX, caretY;
UndoBuffer undoBuffer { data = this };
int savedAction;
- Color selectionColor, selectionText;
+ ColorAlpha selectionColor, selectionText;
SyntaxColorScheme colorScheme { };
menu = Menu { };
// Only used for OnMouseMove so far, for avoiding problems with consequential mouse moves
bool insideNotifySelect;
- Color selectionColor, selectionText, stippleColor;
+ ColorAlpha selectionColor, selectionText, stippleColor;
stippleColor = 0xFFFFFF80;
};
}
}
+static define sheetSelectionColor = Color { 170, 220, 255 };
+static define sheetSelectionText = black;
+
class Sheet : Window
{
text = $"Sheet";
hasVertScroll = true, alwaysEdit = true, collapseControl = true, resizable = true;
background = viewsBackground;
foreground = viewsText;
+ selectionText = sheetSelectionText;
+ selectionColor = sheetSelectionColor;
bool NotifySelect(ListBox control, DataRow row, Modifiers keyFlags)
{
delete subData;
editData.font = { font.faceName, font.size, font.bold };
+ if(eClass_IsDerived(editData._class, class(DropBox)))
+ {
+ DropBox db = (DropBox)editData;
+ db.selectionColor = sheetSelectionColor;
+ db.selectionText = sheetSelectionText;
+ }
+ else if(eClass_IsDerived(editData._class, class(EditBox)))
+ {
+ EditBox eb = (EditBox)editData;
+ eb.selectionColor = sheetSelectionColor;
+ eb.selectionText = sheetSelectionText;
+ }
}
}
return editData;