Normal Topic Layout Color (Read 983 times)
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Layout Color
Oct 26th, 2011 at 11:10pm
Print Post Print Post  
Hi -

I use
Code
Select All
@COLOR(element, tc, bc) 

to change the color of an element ... but ... is there any way to change the backfill color of the layout?

I want the entire record to jump out at me when it meets criteria that I consider an "exception" to the norm.

Thanks!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Layout Color
Reply #1 - Oct 27th, 2011 at 12:17pm
Print Post Print Post  
You may need to create a flat box (set to filled) that is the same size as the form. Begin by setting its color the same as your current form, then use @Color to change it when needed. You may also want to add ForceRedraw() to the end of that code.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Layout Color
Reply #2 - Oct 27th, 2011 at 8:59pm
Print Post Print Post  
Hmmmm -  I didn't know whether to start a separate thread or leave it here - and, of course, you know what I finally decided.  (lol)

When trying to work on your suggestion (Carl) - I ran into a somewhat unrelated problem. 

I am trying to use the flat box (and having some trouble and some luck with it) .. and I actually got it to work once.

I simply made the box a different color (the one I want to jump out at me) but I made it invisible and then switched it to visible when my criteria was met.  (As I said, it worked once).

For some reason though, when trying to refine it, I get an error message saying that "Some or all of the programming in this form has failed to compile.  No event programming will run.

But I had "tested" my programming and did not get any error message.  I even went back and intentionally put incorrect coding in.  When I tested it, it was identified and when I deleted the incorrect code, it "passed." 

BUT, when I open the database, I still get the error message.  What gives?  What do I do?  I am eager to get this feature working - and looks like Carl got me on the right track - but I need to get around this glitch.

- Spencer
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Layout Color
Reply #3 - Oct 27th, 2011 at 9:49pm
Print Post Print Post  
This happened to me before. The program editor failed to spot the error but compiler would not let you slide. I do not remember what exactly that was. You know what you coded the last.... Mark out the latest part and work with a few lines of code at a time to spot the error. If I remember it right, I spotted an error with having element not named properly. Element was named with a name that named form existed in the application.

If you just look at the code in the Editor that is alright but when you take into consideration the whole application and check the integrity of the application, compiler would not accept the conflicts in naming conventions. Am I making sense?
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Layout Color
Reply #4 - Oct 27th, 2011 at 10:18pm
Print Post Print Post  
Bharat is correct. I also have seen this before, but can't remember the precise details either. Though, it did have something to do with the name of something matching the name of something else.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Layout Color
Reply #5 - Oct 27th, 2011 at 10:22pm
Print Post Print Post  
If you have been moving elements, look for an element that is not on the form but is on the canvas (the surface under the form). Runtime has no canvas. Designer does. So when code compiles in Designer it can "see" that element. But when it compiles in runtime, it cannot.

If this is the case, move that element back onto the form.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Layout Color
Reply #6 - Oct 28th, 2011 at 9:17pm
Print Post Print Post  
As it turned out, I am glad that I posted the programming problem here because it WAS directly related to what I was trying to do.

I'm happy to say that you were ALL right; however, Mark, you hit the nail precisely on the head ... and that explains why it worked once and not again.

Originally I had the box parented to the form.  When I looked at it, though, it looked a little awkward, so I decided that I wanted the box to cover the entire screen (canvas - which I now know it's called) for a more professional look ... so I simply "enlarged" the box.  That's when my problem started.

Apparently, when I enlarged the box, it lost parenting to the form (unbeknownst to me) and that caused the compilation error.

So - in order to put this to rest - and to know what I can and can't do ...

Is there any way I can change the color of the canvas?  Smiley
I would be thrilled if I can - but, at least I have a middle-of-the-road solution.

Thanks!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Layout Color
Reply #7 - Oct 28th, 2011 at 11:18pm
Print Post Print Post  
SpencerWulwick wrote on Oct 28th, 2011 at 9:17pm:
Is there any way I can change the color of the canvas?  Smiley


The canvas doesn't exist in runtime, so there is no point in making it bigger, or changing its color. It is a designer only concept. You can enlarge the form (click on an empty spot on the form, press shift-right or shift-down to enlarge) and then place your large static box on the large form making sure that it doesn't overlap onto the canvas.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Layout Color
Reply #8 - Oct 29th, 2011 at 6:32pm
Print Post Print Post  
Mark -

I'm usually pretty good about understanding concepts; however I must be missing something in this situation.

My form takes up a little more than half of the visual screen area.  My form background is yellow and so is the unused area that I see on my screen. 

So when you say there is no need to change the "canvas" (or whatever that excess unused area is) there is a need in terms of aesthics.

In any event, I had forgotten about resizing a form and that is a help.  There is still a "border" of yellow when I change the box color - but it is much better than what I had before.  So, thanks for your help and I will just work with what I have!  Smiley

  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Layout Color
Reply #9 - Oct 29th, 2011 at 9:27pm
Print Post Print Post  
The canvas in SDesigner is the area beneath and (if larger than the form) around the form. It has a very specific purpose. It provides a place to place elements that is not on the form to get them out of the way, without having to delete them. Of course, placing elements is a temporary thing, and they will eventually be moved off of the canvas and back onto the form.

In runtime, there is essentially a "backdrop" behind the form that serves no function other than being the empty space in which the form lives. Other than a minor annoyance with scrollbars expanding, there is really no reason to make a top level form any smaller than the largest the form's window can open. While working with it in SDesigner, it is ideal to make sure you have plenty of room to make dragging elements about easy.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged