cstarling1989 0 Posted February 19 I would like to give users of my software the possibility of setting/assigning hint texts to controls for which I have not yet set a hint text. However, no hint line appears in the BTM for these controls because no line is set for them in the FRM file. If I enter a dummy text with a space so that something appears in the BTM for modification, an empty hint text is always displayed. Does anyone have any idea how I can solve my problem? Thank you! Share this post Link to post
Roger Cigol 103 Posted February 19 I haven't tried this but I would have thought just assigning a text string to the components "hint" property at run time would make it appear..... Share this post Link to post
Anders Melander 1782 Posted February 19 I'm not sure I understand you. Where would your users specify the hint texts? In BTM? If so you can configure BTM to synthesize properties in case the property "default" mechanism caused them not to be stored. This is already done for the TField.DisplayLabel property which isn't stored in the DFM if its value equals the FieldName property: So you need to specify: The control type as a regular expression. The name of the property to synthesize. Hint in your case. The synthesized value of the property. Probably just an empty string in your case. The problem here is that you probably want this done for lots of different controls so I'm not if this is feasible for you. It would of course best if you could just set the default hint texts in your base language so there's something to translate. Surely, if a control needs a hint text in one language, it needs it in all languages. Share this post Link to post
Sherlock 663 Posted February 21 This On 2/19/2024 at 10:12 PM, Anders Melander said: t would of course best if you could just set the default hint texts in your base language so there's something to translate. Surely, if a control needs a hint text in one language, it needs it in all languages. or I would suggest to keep going with dummy spaces and to remove then at runtime. Then, no hints are displayed where none are there to display. Share this post Link to post
Anders Melander 1782 Posted February 21 7 hours ago, Sherlock said: keep going with dummy spaces and to remove then at runtime. Yes, I guess that could be done; Hook into the application OnShowHint handler and suppress empty hints. Share this post Link to post