Coder Social home page Coder Social logo

Comments (5)

VladimirMarkelov avatar VladimirMarkelov commented on June 28, 2024

Hi,

As far as understand, you want to have different background color for "visited" cells. Correct?

In this case, I think, the current solution is like this:

  1. Create an array somewhere that will hold visited cells
  2. On cell select event add the cell to the vector
  3. Override OnDrawCell event, and inside it check if a cell with corrdinates event.Row and event.Col is "visited". If so, change event's value event.Bg to your custom one. To avoid hiding highlight for the current selection, additionally you can check event.RowSelected and event.ColSelected - if both are true - do not apply your Bg, let it paint with default one.

from clui.

noroot777 avatar noroot777 commented on June 28, 2024

It seems works. Thanks.
But there's another issue that I mind just now. SetFullRowSelect not works.
I set this in my code tabEvents.SetFullRowSelect(true), but only the selected cell hiliting, not the whole row.
Am I missing something?

from clui.

noroot777 avatar noroot777 commented on June 28, 2024

The whole row of NO.11 should be hiliting as my consider, but only the selected cell.

image

from clui.

VladimirMarkelov avatar VladimirMarkelov commented on June 28, 2024

Is it with default draw handler? Or you have overloaded it?

from clui.

noroot777 avatar noroot777 commented on June 28, 2024

Sorry, my fault, I changed the TableSelectedText attr in theme file. For my theme above, when I set TableSelectedText=white bold, it will hiliting the whole row.

image

from clui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.