357mag 2 Posted December 12 I'm using a regular Label currently to store the sum of some addition, but the book I'm working out of shows the Label sunken in a little bit. It's not perfectly flat like a regular Label is. It has a real shallow depression in it. What is the name of this control? Share this post Link to post
Anders Melander 1815 Posted December 12 13 minutes ago, 357mag said: What is the name of this control? It's not a standard control. It was a style that was popular in the nineties (where it belongs). The Raize controls (now Konopka Signature VCL Controls) or the JVCL probably has a label that can paint like that. Share this post Link to post
Remy Lebeau 1435 Posted December 12 (edited) 2 hours ago, 357mag said: What is the name of this control? You can use a standard TPanel, simply adjust its BevelInner and BevelOuter properties to mimic the sunken look you want. And, you can assign text to a TPanel like you can with a TLabel (or, just put a TLabel on the TPanel). Edited December 12 by Remy Lebeau Share this post Link to post
Sherlock 663 Posted December 13 Cosmetics aside, you should not store values in (visual) components. Store values in variables, class members or a database... not in a visual component. That is not its purpose. Try to avoid misuse of objects. For very small projects this might be OK. But overall and in real life this is not a way to go. Share this post Link to post
dummzeuch 1517 Posted December 13 (edited) 15 hours ago, 357mag said: I'm using a regular Label currently to store the sum of some addition, but the book I'm working out of shows the Label sunken in a little bit. It's not perfectly flat like a regular Label is. It has a real shallow depression in it. What is the name of this control? Maybe it's a TStaticText? That one has got Bevel-options. Edited December 13 by dummzeuch Share this post Link to post
ToddFrankson 3 Posted December 13 7 hours ago, Sherlock said: Cosmetics aside, you should not store values in (visual) components. Store values in variables, class members or a database... not in a visual component. That is not its purpose. Try to avoid misuse of objects. For very small projects this might be OK. But overall and in real life this is not a way to go. Explain how else you display a sum to the user, without displaying the data in a control This will be good to learn. Share this post Link to post
Dave Novo 51 Posted December 13 1 hour ago, ToddFrankson said: Explain how else you display a sum to the user, without displaying the data in a control This will be good to learn. This may just be a semantic issue. The OP wrote he was "storing" the sum in a label, maybe he meant display. @Anders Melander is correct, data should be stored in variables/fields etc. Of course, if you need to display to the user, some UI control is needed. I have seen too much code where some value was actually stored in a UI control, and the only way to get the current state of that value was to reference the UI control. That is bad. Share this post Link to post
Anders Melander 1815 Posted December 13 52 minutes ago, Dave Novo said: @Anders Melander is correct, data should be stored in variables/fields etc. The style I was referring to was the visual style and I assumed that the OP meant something like this: Unfortunately he is apparently too busy to respond so we can only guess. Share this post Link to post