thisform.caption normally displays at the left most. How best i can add an additional caption to the right most of my form just before MinButton? Would appreciate helpful tips.
There is no way to specific. But Logical thing is there. Try this
You place the below code in a seperate custom METHOD.
****
thisform.caption = SPACE((THISFORM.WIDTH-LEN("CAPTION")/6)+"CAPTION"
******
In the Resize Method of the Form Call the above custom Method.
Another way, if you truly want a right justified title caption, is to eliminate the title bar altogether.
Then if want the appearance of a true title bar, add a textbox the width of the form. Add the desired 'caption' text to the textbox value property and set the textbox's alignment to right aligned. The text box should be disabled and of course make it's disabled color properties the same as a title bar would be for the form's color scheme.
Caveat:
You'll need to add some intelligence in the form' activate/deactivate methods to change the color of the textbox between the appropriate 'form active' / 'form inactive' mode to mimic the behavior of a true title bar. Otherwise, you may confuse your users when they switch between other forms you may have on the screen.
Add a small square commandbutton to the right of the textbox to mimic the form close button if you like, with code to release the form.
Also, if you add the command button, you'll need to adjust the width of the textbox butt up against the left edge of the command button and place another textbox underneath the command button; with appropriate colors and disabled properties set. And of course it will have to be managed by the active/deactivate code.
Another way, if you truly want a right justified title caption, is to eliminate the title bar altogether.
Then if want the appearance of a true title bar, add a textbox the width of the form. Add the desired 'caption' text to the textbox value property and set the textbox's alignment to right aligned. The text box should be disabled and of course make it's disabled color properties the same as the title bar's would be for the form's color scheme.
Caveat:
...
You'll need to add some intelligence to the form so when the form activates/deactivates the psuedo title bar (textbox) changes color between the appropriate 'form active' / 'form inactive' mode colors mimicking the behavior of a true title bar. Otherwise, you may confuse your users when they switch between other forms or applications. (note: the activate/deactivate or gotfocus/lostfocus methods won't work. You'll need to add a timer or some other trick to make this work. Maybe one of the other geniuses has an easier method. I'll post the timer code if you like.)
...
Add a small square commandbutton to the right of the textbox to mimic the form close button if you like, with code to release the form.
Also, if you add the command button(s), you'll need to adjust the width of the textbox to butt up against the left edge of the command button(s) and place another textbox underneath the command button with appropriate colors and disabled properties set. And of course it will have to be managed by the active/deactivate code mentioned above.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.