REDEFINE SAY on Buttonbar

User avatar
TimStone
Posts: 2951
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: REDEFINE SAY on Buttonbar

Post by TimStone »

Enrico,

Code: Select all | Expand

   REDEFINE BUTTONBAR oBarInv ID 100 SIZE 60,55 OF oDiw 2015
          oBarInv:bClrGrad := aPubGrad
Adding this per your example:

Code: Select all | Expand

    oDiw:oBarInv:bPainted = { || oDiw:oBarInv:Say( 5, 200, cIAMsg, , , , .T., .T. ) }
Creates an error: Message not found: TDIALOG:OBARINV

Also note, cIAMsg is a variable for the text to be displayed.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
Antonio Linares
Site Admin
Posts: 42275
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: REDEFINE SAY on Buttonbar

Post by Antonio Linares »

Enrico Maria Giordano wrote:You changed your look again! :-)
It is an AI created painting :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 42275
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: REDEFINE SAY on Buttonbar

Post by Antonio Linares »

Dear Tim,

Instead of:

oDiw:oBarInv:bPainted = { || oDiw:oBarInv:Say( 5, 200, cIAMsg, , , , .T., .T. ) }

use:

oDiw:oBar:bPainted = { || oDiw:oBar:Say( 5, 200, cIAMsg, , , , .T., .T. ) }
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Enrico Maria Giordano
Posts: 8728
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: REDEFINE SAY on Buttonbar

Post by Enrico Maria Giordano »

Antonio Linares wrote:
Enrico Maria Giordano wrote:You changed your look again! :-)
It is an AI created painting :-)
Are you serious?
User avatar
Antonio Linares
Site Admin
Posts: 42275
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: REDEFINE SAY on Buttonbar

Post by Antonio Linares »

Yes, using https://www.myheritage.es/ai-time-machine/all-results

Its really amazing. It requires ten fotos of yourself and then it starts creating all kind of paintings.

That one seemed to me a very good one :-)

AI is here more and more... ;-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
TimStone
Posts: 2951
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: REDEFINE SAY on Buttonbar

Post by TimStone »

Antonio,

I tried but it fails. The actual bar object is oBarInv

oBar does not exist so the error says there is no exported variable bPainted ...

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
Enrico Maria Giordano
Posts: 8728
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: REDEFINE SAY on Buttonbar

Post by Enrico Maria Giordano »

Try

Code: Select all | Expand

oBarInv:bPainted = { || oBarInv:Say( 5, 200, cIAMsg, , , , .T., .T. ) }
User avatar
TimStone
Posts: 2951
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: REDEFINE SAY on Buttonbar

Post by TimStone »

It doesn't show anything. It's not a huge problem, but I do see the REDEFINE SAY has limitations not found in @ ....SAY. Included in them is the inability to use a border.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
Posts: 2951
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: REDEFINE SAY on Buttonbar

Post by TimStone »

I was looking for a "cleaner" display ... but decided to go a different route.

I redefined my control from LTEXT to CTEXT and added the border to the resource ( in the .rc, WS_BORDER )

It looks decent and will work OK ...
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
Enrico Maria Giordano
Posts: 8728
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: REDEFINE SAY on Buttonbar

Post by Enrico Maria Giordano »

TimStone wrote:It doesn't show anything.
We need a code sample showing the problem in order to help you.
User avatar
TimStone
Posts: 2951
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: REDEFINE SAY on Buttonbar

Post by TimStone »

Enrico,

Marc's example, as stated before, shows the exact problem.

It is a very simple problem.
1). You have a variable, ie. abc := "Test One", and you might change it to abc := "Test two" when executing a process in the program.
2). You have a button bar which is using a gradient background.
3). You want to display the content of the variable at some place on the button bar. It needs to be after the buttons.
4). You want the text to appear on the button bar without a background because you want the gradient to be uninterrupted.
5). Using a SAY command with a CTEXT control in an RC file, you get the text ( which changes as the variable is reset ).
6). The SAY command defaults to the Windows Style background that we are using rather than allowing the gradient background to show through.
7). The use of TRANSPARENT, no matter how it is implemented, does not work to achieve this objective.
8). If you look above the browse on Marc's example, you see the exact problem. The word Test has a background around it different than the dialog, and thus stands out.

As I said, I ended up just putting a border around it so it doesn't look as bad. It would be nice to have the ability to write text on a button bar where just the text is displayed and not the background.

For now, I will simply use my current display, and maybe at some point this can be addressed in FWH code.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
Enrico Maria Giordano
Posts: 8728
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: REDEFINE SAY on Buttonbar

Post by Enrico Maria Giordano »

TimStone wrote:Enrico,

Marc's example, as stated before, shows the exact problem.
I've already shown a workaround for that problem.
User avatar
TimStone
Posts: 2951
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA
Contact:

Re: REDEFINE SAY on Buttonbar

Post by TimStone »

I tried your workaround. However I am using RESOURCES for the control. It didn't work.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Post Reply