[ wxwindows-Patches-1519969 ] Custom gridlines (2)

SourceForge.net noreply at sourceforge.net
Mon Jul 10 07:11:38 PDT 2006


Patches item #1519969, was opened at 2006-07-10 14:11
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1519969&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Søren Lassen (slassen)
Assigned to: Nobody/Anonymous (nobody)
Summary: Custom gridlines (2)

Initial Comment:
I submitted this patch before (1496015), was asked to 
provide documentation, did that (in the same patch) - 
and then nothing happened. So I reckon that maybe I 
should have submitted a new patch instead? (this is 
it).

Is this the right thing to do?


The patch defines 3 virtual functions:
virtual wxPen GetDefaultGridLinePen();
virtual wxPen GetRowGridLinePen(int row);
virtual wxPen GetColGridLinePen(int col);
The user/programmer can override these to set 
different 
or individual gridlines, e.g. (from a Midi editor that 
I am developing, makes the octave borders black):

wxPen MidiGrid::GetRowGridLinePen(int row)
{
if(row%12==7) 
return wxPen(*wxBLACK, 1, wxSOLID);
else 
return GetDefaultGridLinePen();
}

The functions are public, so that other classes can 
query them.

There are no other changes to functionality and 
interfaces.

The patch also includes a minimal change to 
griddemo.cpp, without which the program would not 
compile with the Borland compiler.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1519969&group_id=9863




More information about the wx-dev mailing list