Jump to content


Photo

NxTextColumn: Random, Intermittent Font.Color changes?


  • Please log in to reply
2 replies to this topic

#1 BelangerC

BelangerC

    Senior Member

  • Members
  • PipPip
  • 221 posts
  • Location:Richmond, CA USA
  • Interests:Alternative medicine, programming for

Posted 27 August 2023 - 04:22 PM

Hi, Boki:

 

This is a weird one!

 

I have a unit which creates grids using stored grid properties in a database. I have been converting code, properties and events from NextGrid 5 to NG6.  I am using essentially the same code as NG5 and only making changes where the properties and events change in name or functionality. I have kept all the NG5 code and simply use a new NG6 grid which I can switch between NG6 and NG5 by a menu selection then having the user reload the grid in the alternate NextGrid 5 or 6. I will keep this fail safe menu item until convinced that the NG6 grids are equally functional as the NG5 grids. Right now, the NG5 grids do not display this behavior.

 

What I am seeing is that on bringing up any grid during run time, the text font of the various columns will change from the default, clBlack, to almost any color. All text in the grid will be assigned the same non-black color. On closing the grid and reopening/recreating it, the font.color may or may not be the same, often it will go back to the default color, clBlack, but on another attempt to reopen the grid the color may change again.

 

If I continue to open various grids, a new color may be assigned or the default black color may be used. No apparent pattern.

 

As the grid is created I have a procedure, SetColProps6, which assigns the font.color based on what is stored in the database. I tried setting the font.color explicitly to clBlack with no change to this random color assignment.

 

I am using the newer (compared to NG5) event: NxTextColumn6StyleText. But if I simply exit out of this event without running the code, still I am getting the random color assignment.

 

Where this becomes a problem is when the color is something like clYellow which is very difficult to read. Thankfully, I have not seen it become clWhite yet.

 

At this point I am completely at a loss as to where this happening. Can you either suggest where this might be happening or if you can or have observed this, suggest a fix?

 

Thank you,

Chuck

 



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,289 posts
  • Gender:Male

Posted 28 August 2023 - 01:45 AM

Hi Chuck,

 

Can you please post a screenshot here? It will be pretty hard to recreate it :(

 

I’m also working on other things you reported.


boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 BelangerC

BelangerC

    Senior Member

  • Members
  • PipPip
  • 221 posts
  • Location:Richmond, CA USA
  • Interests:Alternative medicine, programming for

Posted 28 August 2023 - 01:06 PM

Here are 4 screen shots of one of the tables that use NG6 with the same unit to build the table from database stored properties.

The tables were opened successively, i.e. I opened the table, closed it then reopened, via a double click on the background treeview node; what you see are four different font colors (the 1st and 4th are different shades of green).

 

Attached File  NG6_Table1.png   46.71KB   1 downloadsAttached File  NG6_Table2.png   45.58KB   1 downloadsAttached File  NG6_Table3.png   43.47KB   1 downloadsAttached File  NG6_Table4.png   45.78KB   1 downloads

 

Not sure this makes a difference, but most of the tables that rely on this unit are treed tables, i.e. the first column is a tree column.

 

Hope this helps!

Thank you for working on the other issues, too.

 

Turns out I have only a few months left to work, then I am retiring, and would like to finish this up for them. They think they are going to have their new web site program done by the end of the year and I want a final desktop version completed by then since I kind of doubt if they will be able to be done with the new program by then. As a follow up to your email, they are going a completely different direction then our current desktop program, which makes sense because they are using very different programming languages and tools. 

 

Best regards,

Chuck

 

 






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users