Normal Topic TableView - different text colors (Read 698 times)
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
TableView - different text colors
Mar 3rd, 2010 at 9:50pm
Print Post Print Post  
we might sell 4 different brands of the same cartridge product, and the different colors would help delivery and customers to key/identify the correct item.

In form and tableview, I would like my SOLines subform to display line items in different colors (the color depending on the value in one of the LE's of that record).   I'm able to get there in form view.  But tableview is proving difficult.  I attempted this last Summer without luck, and am revisiting it now, post 2.5version.  But still no luck (Anything I attempt with 'draw' event causes Sesame to lock up and not open).  Is anyone else doing this in tableview?

  

Larry
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: TableView - different text colors
Reply #1 - Mar 4th, 2010 at 2:57pm
Print Post Print Post  
If On Draw is locking up, then you may have caused an endless loop where it can't stop drawing. We'd need to see your code to determine that.

As to changing colors in a subform, the On Draw method should work fine provided your Form is set to initially display in Form View and is then switched to Table View. Subforms set to initially display in table view don't draw the same way.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Re: TableView - different text colors
Reply #2 - Mar 5th, 2010 at 5:54am
Print Post Print Post  
The following code works great (ItemNum::OnDraw) as long as Just In Time Compilation is set to "OFF" in sesame.ini.  If it's set to "ON", then the initial Sesame screen for the app loads, but as soon as I try to go to a form, the screen blinks and then nothing happens visually, although Task Manager shows the CPU being loaded to about a constant 40%.

           If (@Right(ItemCat, 2) = "WE") or (@Right(ItemCat, 2) = "RE")
                       
               {
                 //RGBColor(ItemCat, 0, 127, 0, -1, -1, -1)
                 RGBColor(ItemNum, 0, 127, 0, -1, -1, -1)
                 //RGBColor(ItemDesc, 0, 127, 0, -1, -1, -1)
                 
               }

               else If (@Right(ItemCat, 2) = "WX")
                    {
                       //RGBColor(ItemCat, 255, 0, 0, -1, -1, -1)
                       RGBColor(ItemNum, 255, 0, 0, -1, -1, -1)
                       //RGBColor(ItemDesc, 255, 0, 0, -1, -1, -1)
                       
                        }
                      else If (@Right(ItemCat, 2) = "WW")
                           {
                             //RGBColor(ItemCat, 0, 0, 127, -1, -1, -1)
                             RGBColor(ItemNum, 0, 0, 127, -1, -1, -1)
                             //RGBColor(ItemDesc, 0, 0, 127, -1, -1, -1)
                             
                               }
                                 else
                                      {
                                   //RGBColor(ItemCat, 0, 0, 0, -1, -1, -1)
                                   RGBColor(ItemNum, 0, 0, 0, -1, -1, -1)
                                   //RGBColor(ItemDesc, 0, 0, 0, -1, -1, -1)
                                   
                                          }
  

Larry
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: TableView - different text colors
Reply #3 - Mar 5th, 2010 at 4:54pm
Print Post Print Post  
Hello lksseven,

I'll get that written up and passed on to development.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
lksseven
Full Member
***
Offline



Posts: 416
Location: Southwest
Joined: Jan 26th, 2009
Re: TableView - different text colors
Reply #4 - Mar 5th, 2010 at 5:10pm
Print Post Print Post  
Thanks, Ray!

Another thing regarding Just In Time Compilation I just noticed: 
       - with JITC OFF, if I search for records with a specific date of 3/4/2010, I get a result set of 3 records (which I know is not accurate).
in with
       - but with JITC ON, if I do that same search, I get a result set of 34 records (which is correct).

If that is something that could be my coding fault, please advise.
« Last Edit: Mar 5th, 2010 at 7:10pm by lksseven »  

Larry
Back to top
IP Logged