Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grid emulating combobox

Status
Not open for further replies.

ChrisRChamberlain

Programmer
Mar 23, 2000
3,392
GB
I'm trying to get a grid to emulate a part of a combobox's behaviour.

As the mouse passes over an unselected record, the fore/background of the cell/row should change colour from default colours to specific colours and back to default colours when the mouse is no longer over the cell.

Any ideas?

TIA

Chris
 
Hi!

Well, grid with Dynamic* functionality is too slow to use it with MouseMove events - that is a problem.
The workaround is quite complex - maintain separate control over the grid to simulate grid cell(s) with another color and move it as mouse moves. I tried to make the similar thing 2 years ago, but my row was designed to organize Edit mode in the grid - I do not edit cells using grid controls but use controls that just put over the grid row in appropriate places. Urggggh, that was such a complex approach that I never finished it...


Vlad Grynchyshyn
vgryn@softserve.lviv.ua
The professional level of programmer could be determined by level of stupidity of his/her bugs
 
Vlad

Thanks for your response.

I could not envisage a simple answer, but was hoping that someone might have been there before.

An oddity I noticed was that it appears you cannot change the mousepointer within a grid. You can set the properties, (including custom), both in the grid and the cell without effect.

True or false?

Chris
 
Hi!

True. That is why many companies use grid cover controls. The more details and more quality of functionality you need - more detailed cover required. For example, to organize cell-level tool tips and mouse functionality you will require to put tramsparent shapes for each grid column (or even cell as in your case). In some cases grid becomes so slow that it is much better to make your own grid composed from set of controls and scroll bars, using only headers from original grid control.

Alternatively, you can use CTI Technologies grid control that have a lot of additional functionality and works much more quickly. Hope this will fit your needs ;)


Vlad Grynchyshyn
vgryn@softserve.lviv.ua
The professional level of programmer could be determined by level of stupidity of his/her bugs
 
I have used "True DB Grid" Version 5. It has all the bells and whistles. They are probably to version 7 or 8 by now. It has superb color control, header control, row control and cell control. Here is a link. As I recall it is around $400 but royalty free for distribution of your apps.


Anyhow, $400 is better than 40+ hours writing your own grid.

Good Luck!
-Pete
 
Pete

Thanks for the link.

The fact that a grid won't emulate a combobox in this way is not ultimately important for this particular project, but would have been a useful feature.

The mousepointer problem is solvable but just irritating.

Why doesn't Mr Gates leave things out if they are not supposed to work? X-)

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top