if(parent && parent.created && !nonClient) parent.OnChildResized(this, x, y, w, h);
}
}
- get { value = clientSize; }
+ get { value = this ? clientSize : { 0, 0 }; }
};
property Size initSize { get { value = sizeAnchor.size; } };
property Point scroll
{
property_category $"Behavior"
- set { SetScrollPosition(value.x, value.y); }
+ set { if(this) SetScrollPosition(value.x, value.y); }
get { value = scroll; }
};
property Font fontObject { get { return usedFont ? usedFont.font : null; } };
property Point clientStart { get { value = clientStart; } };
property Point absPosition { get { value = absPosition; } };
- property Anchor normalAnchor { get {value = normalAnchor; } };
+ property Anchor normalAnchor { get { value = normalAnchor; } };
// property Size normalSizeAnchor { get { value = normalSizeAnchor; } };
property bool active { get { return (bool)active; } };
property bool created { get { return (bool)created; } };
bool skipCheck;
#endif
public:
- property int64 tag { set { tag = value; } get { return tag; } };
+ property int64 tag { set { if(this) tag = value; } get { return this ? tag : 0; } };
property DataRow previous { get { return prev; } };
property DataRow next { get { return next; } };
property int index { get { return (this && (!parent || parent.IsExpanded())) ? index : -1; } };
get { return GetData(listBox.fields.first); }
};
property bool isHeader { set { header = value; } get { return this ? header : false; } };
- property BitmapResource icon { set { icon = value; } get { return icon; } };
+ property BitmapResource icon { set { if(this) icon = value; } get { return this ? icon : null; } };
property bool collapsed
{
set
{
- if(collapsed != value)
+ if(this && collapsed != value)
{
collapsed = value;
if(parent.IsExpanded())
}
}
#ifdef _DEBUG
- if(!skipCheck)
+ if(this && !skipCheck)
listBox.CheckConsistency();
#endif
}
public:
// Properties
property bool freeSelect { property_category $"Behavior" set { style.freeSelect = value; } get { return style.freeSelect; } };
- property DataRow currentRow { property_category $"Private" /*"Behavior"*/ set { SetCurrentRow(value, false); } get { return currentRow; } };
+ property DataRow currentRow { property_category $"Private" /*"Behavior"*/ set { if(this) SetCurrentRow(value, false); } get { return this ? currentRow : null; } };
property DataField currentField
{
get { return currentField; }
OnApplyGraphics();
}
}
- get { return rowHeight; }
+ get { return this ? rowHeight : 0; }
};
property Seconds typingTimeout
{
void SetCurrentRow(DataRow row, bool notify)
{
- if(currentRow != row || (currentRow && currentRow.selectedFlag == unselected))
+ if(this && (currentRow != row || (currentRow && currentRow.selectedFlag == unselected)))
{
int headerSize = ((style.header) ? rowHeight : 0);
int height = clientSize.h + 1 - headerSize;