REDEFINE SAY on Buttonbar

Re: REDEFINE SAY on Buttonbar

Postby Enrico Maria Giordano » Tue Dec 06, 2022 3:12 pm

You changed your look again! :-)
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: REDEFINE SAY on Buttonbar

Postby TimStone » Tue Dec 06, 2022 7:14 pm

Enrico,

Code: Select all  Expand view
  REDEFINE BUTTONBAR oBarInv ID 100 SIZE 60,55 OF oDiw 2015
          oBarInv:bClrGrad := aPubGrad


Adding this per your example:

Code: Select all  Expand view
   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
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: REDEFINE SAY on Buttonbar

Postby Antonio Linares » Tue Dec 06, 2022 8:16 pm

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: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: REDEFINE SAY on Buttonbar

Postby Antonio Linares » Tue Dec 06, 2022 8:18 pm

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
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: REDEFINE SAY on Buttonbar

Postby Enrico Maria Giordano » Tue Dec 06, 2022 8:21 pm

Antonio Linares wrote:
Enrico Maria Giordano wrote:You changed your look again! :-)


It is an AI created painting :-)


Are you serious?
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: REDEFINE SAY on Buttonbar

Postby Antonio Linares » Tue Dec 06, 2022 8:24 pm

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
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Re: REDEFINE SAY on Buttonbar

Postby TimStone » Tue Dec 06, 2022 8:47 pm

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
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: REDEFINE SAY on Buttonbar

Postby Enrico Maria Giordano » Tue Dec 06, 2022 10:19 pm

Try

Code: Select all  Expand view
oBarInv:bPainted = { || oBarInv:Say( 5, 200, cIAMsg, , , , .T., .T. ) }
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: REDEFINE SAY on Buttonbar

Postby TimStone » Tue Dec 06, 2022 10:55 pm

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: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: REDEFINE SAY on Buttonbar

Postby TimStone » Tue Dec 06, 2022 11:07 pm

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
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: REDEFINE SAY on Buttonbar

Postby Enrico Maria Giordano » Wed Dec 07, 2022 9:31 am

TimStone wrote:It doesn't show anything.


We need a code sample showing the problem in order to help you.
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: REDEFINE SAY on Buttonbar

Postby TimStone » Wed Dec 07, 2022 6:59 pm

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
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: REDEFINE SAY on Buttonbar

Postby Enrico Maria Giordano » Wed Dec 07, 2022 7:16 pm

TimStone wrote:Enrico,

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


I've already shown a workaround for that problem.
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: REDEFINE SAY on Buttonbar

Postby TimStone » Fri Dec 09, 2022 12:15 am

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
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: W3C [Validator] and 90 guests