357mag 2 Posted Thursday at 07:07 PM 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 1813 Posted Thursday at 07:29 PM 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 1421 Posted Thursday at 09:40 PM (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 Thursday at 09:52 PM by Remy Lebeau Share this post Link to post
Sherlock 663 Posted Friday at 09:36 AM 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 1515 Posted Friday at 10:59 AM (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 Friday at 11:00 AM by dummzeuch Share this post Link to post
ToddFrankson 2 Posted Friday at 04:47 PM 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 Friday at 06:23 PM 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 1813 Posted Friday at 07:24 PM 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