Report message to a moderator
#include <CtrlLib/CtrlLib.h> using namespace Upp; struct MyArrayCtrl : public ArrayCtrl { public: MyArrayCtrl() { AddColumn("Column 1"); AddColumn("Hand cursor column"); AddColumn("Column 2"); for(int i = 0; i < 10; i++) { Add("foo", "bar", "foo"); } } virtual Image MouseEvent(int event, Point p, int zdelta, dword flags) { Image img = ArrayCtrl::MouseEvent(event, p, zdelta, flags); if(GetLineAt(p.y) >= 0) { int width; int x0 = 0; for(int col = 0; col < GetColumnCount(); col++) { width = HeaderObject().GetTabWidth(col); if(HeaderTab(col).GetText().IsEqual("Hand cursor column")) break; x0 += width; } if((p.x >= x0) && (p.x < x0 + width)) img = Image::Hand(); } return img; } typedef MyArrayCtrl CLASSNAME; }; struct MyApp : public TopWindow { public: MyArrayCtrl arr; MyApp() { Add(arr.SizePos()); } }; GUI_APP_MAIN { MyApp().Run(); }