Home » Developer & Programmer » Forms » How to ad Multiline Label on a Button?
How to ad Multiline Label on a Button? [message #111824] Mon, 21 March 2005 03:19 Go to next message
saadatahmad
Messages: 452
Registered: March 2005
Location: Germany/Paderborn
Senior Member


Hi,
I'm facing a problem and I don't have an idea how to solve it. I have searched in the documentation but useless. Here's my problem:
I have a Form where I'm showing the buttons as advertisements.
I'm setting the label on the buttons dynamically (by using a cursor). I have this line in the cursor:

set_item_property('ctrl_ads.ad'||c2.serial_no,label,c2.serial_no||' '||c2.SUBJ_TO_PASTE_ON_AD||' size '||c2.dummy_ad_height||'x'||c2.dummy_ad_width);

This statement says:
Ad number First || Subject of the ad || Size || Numeric Size
e.g:

4 Fast Telecom Internet Services size 10*4

How I can achive this type of label?

4 Fast Telecom Internet
Services size 10*4


My problem is if the label is larger than the button's width then it doesn't fit into the button and is truncated from both sides.
I consulted this problem with my boss (who is no doubt excellent in his work) and he told me that we cannot add multiline button's label on a button and I'm fully agreed with him, however, we all are always keen to find the solution of a problem from anywhere, I want to know if there is some way that if the label is truncated, we can move the label to second line on the button or if we can ad the first part of the label on first line and the second part on the second line or there's some other way to accomplish this task?


Please help.

Thanks in Advance
Saadat Ahmad

Re: How to ad Multiline Label on a Button? [message #111844 is a reply to message #111824] Mon, 21 March 2005 05:57 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Build yourself a text item that looks like a button. That is, use the button colour scheme and 'raised' it like a button instead of 'embedding' it as most text items are normally presented.

You then place a clear button over the top of it and catch the When-Button-Press [you could also try using other 'click' triggers on the text item directly].
Re: How to ad Multiline Label on a Button? [message #111873 is a reply to message #111844] Mon, 21 March 2005 07:41 Go to previous message
saadatahmad
Messages: 452
Registered: March 2005
Location: Germany/Paderborn
Senior Member

Hi
Thanks for yor reply however, please keep these things in mind.
If you see a newspaper, there are many advertisements on any single page.
I have developed a Form and the layout of the form is just like the layout of the newspaper where the users paste the ads.
Say if the user has booked 5 ads. on a particular page, for a particular day, and he receives the sixth ad and the customer asks him to place the ad. on a specific position on the paper.
For this purpose, the user needs to move the positions of other ads. on the page and places the sixth ad. on a proper position.
I have made button for this purpose, which show ads. on any page.
I have a block where I have 99 buttons and I'm setting the properties of buttons dynamically to show them as ads. on the page.
The user is allowed to move any button on any position on the page.
Now in this scenario I can't combine a button and a text item to place the multi line label on the button. I have triggers on the block when mouse-down, when-mouse-up and when-mouse-move which are performing their respective task very well.
I just want to be able to add a multiline label to the button.
I can't use text item instead of buttons.
Please keep these things in mind and then suggest me some solution.
Thanks in advance
Previous Topic: unable to load icons, bmp files
Next Topic: frm-41050 y it works and don't work
Goto Forum:
  


Current Time: Thu Sep 19 18:50:00 CDT 2024