Checkbox text disappears

Checkbox text disappears

Postby TimStone » Tue Oct 25, 2022 6:56 pm

I will start this in a new thread:

WHEN CLICKING ON RADIO BUTTONS OR CHECKBOXES, the Text disappears.

Here is an example of the problem.. This is a printer selection control.

This is the RC. Note we are using Radio buttons this time. They are vertically stacked. The first one starts at position 10, and is 12 points high. So it goes to 22. The next one is at row 25. I use 15 point line spacing for all my dialogs and everything works fine except the behavior on the checkbox and radio controls when clicking one.

Code: Select all  Expand view

PRNSELW DIALOG 0, 0, 230, 90
STYLE  WS_POPUP | WS_CAPTION
CAPTION "Printer Selection Options"
{
    CONTROL         "Use DEFAULT printer",353,"Button",BS_AUTORADIOBUTTON,57,10,108,12
    CONTROL         "Select an ALTERNATE printer",354,"Button",BS_AUTORADIOBUTTON,57,25,158,12
    PUSHBUTTON      "",350,35,40,40,40
    PUSHBUTTON      "",351,95,40,40,40
    PUSHBUTTON      "",352,155,40,40,40
}
 
 


Here is the .prg code that uses this dialog:

Code: Select all  Expand view

/*  FUNCTION prnsel
      Description: Printer selection control
      Date updated: 9/29/2007
*/

FUNCTION prnsel

    // Declare EXTERNAL variables
  LOCAL ofBrush
    MEMVAR oWnd, lGxPrsnt
    // Declare LOCAL variables
    LOCAL prnmeth := 0, oDlg, oRadOpt, lView := .F. , lPrint := .F. , nPrn := 1
    LOCAL cTitle := "Printer Selection Options"
    lGxPrsnt := .T. // Assign static values

    // Create the dialog
  IF cWSshow = "W"
        DEFINE DIALOG oDlg RESOURCE "PRNSELw" BRUSH oBrush transparent TITLE cTitle
    ELSE
        DEFINE DIALOG oDlg RESOURCE "PRNSEL" BRUSH oBrush transparent TITLE cTitle
  ENDIF

    // Create the radio control
    REDEFINE RADIO oRadOpt VAR nPrn ID 353, 354 OF oDlg
    // Create the button controls
    REDEFINE BTNBMP ID 350 of oDlg RESOURCE "HRZMIN" PROMPT "View" NOBORDER TRANSPARENT ;
        ACTION ( lView := .T., oDlg:End ) MESSAGE "Preview the report, with an option to print"
    REDEFINE BTNBMP ID 351 of oDlg RESOURCE "HRPRINT" PROMPT "Print" NOBORDER TRANSPARENT;
        ACTION ( lPrint := .T., oDlg:End ) MESSAGE "Print the report without previewing"
    REDEFINE BTNBMP ID 352 of oDlg RESOURCE "HREXIT" PROMPT "Cancel" NOBORDER TRANSPARENT;
        ACTION ( oDlg:End ) MESSAGE "Cancel the print operation "

    // Activate the dialog
    ACTIVATE DIALOG oDlg CENTERED

    IF lView .AND. nPrn = 2 // View and select printer
        prnmeth := 1
    ELSEIF lView .AND. nPrn = 1 // View and default printer
        prnmeth := 2
    ELSEIF lPrint .AND. nPrn = 2 // Print with selection
        prnmeth := 3
    ELSEIF lPrint .AND. nPrn = 1 // Print to default
        prnmeth := 4
    ENDIF

RETURN ( prnmeth )

 


This has worked fine for the past 15 years. It started being a problem with the latest release of FWH. In this example, click on either button and the text next to it disappears.

I'm using the latest FWH libraries with Visual Studio Community 2022 and Harbour. Builds are both 32 bit and 64 bit.
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: Checkbox text disappears

Postby Silvio.Falconi » Tue Oct 25, 2022 8:06 pm

Rem trasparent
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: Checkbox text disappears

Postby TimStone » Tue Oct 25, 2022 10:01 pm

Silvio,

Nope ... the only thing that happens is the field space for the text does not allow the background to come through, so it's an ugly display.

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: Checkbox text disappears

Postby karinha » Tue Oct 25, 2022 11:44 pm

Code: Select all  Expand view

// C:\FWH..\SAMPLES\TIMSTON2.PRG .and. TIMSTON2.RC

#include "FiveWin.ch"

STATIC lGxPrsnt

FUNCTION Main()

   LOCAL cWSshow := "W"

   SetBalloon( .T. ) // Balloon shape required for tooltips

   SkinButtons()

   PrnSel( cWSshow )

RETURN NIL

/*  FUNCTION prnsel
      Description: Printer selection control
      Date updated: 9/29/2007
*/

FUNCTION PrnSel( cWSshow )

   // Declare LOCAL variables
   LOCAL prnmeth := 0, oDlg, oRadOpt, lView := .F. , lPrint := .F. , nPrn := 1
   LOCAL cTitle := "Printer Selection Options"
   LOCAL oBrush, oView, oPrint, oExit, oFont, oBold
   LOCAL nDTxtColor := 192

   lGxPrsnt := .T. // Assign static values

   DEFINE BRUSH oBrush COLOR nRGB( 192, 192, 192 ) // Gris Claro.
   DEFINE FONT oFont NAME "MS Sans Serif" SIZE 00, -12 BOLD
   DEFINE FONT oBold NAME "MS Sans Serif" SIZE 00, -14 BOLD

   // Create the dialog
   IF cWSshow = "W"

      DEFINE DIALOG oDlg RESOURCE "PRNSELw" BRUSH oBrush TRANSPARENT         ;
         TITLE cTitle FONT oBold

   ELSE

      DEFINE DIALOG oDlg RESOURCE "PRNSEL" BRUSH oBrush TRANSPARENT          ;
         TITLE cTitle FONT oBold

   ENDIF

   oDlg:lHelpIcon := .F.

   // Create the radio control
   REDEFINE RADIO oRadOpt VAR nPrn ID 353, 354 OF oDlg

   AEval( oRadOpt:aItems, { | oRadOpt | oRadOpt:lTransparent := .T., ;
          oRadOpt:SetFont( oFont ), oRadOpt:nClrText := nDTxtColor } )

   // Create the button controls
   REDEFINE BTNBMP oView ID 350 of oDlg RESOURCE "HRZMIN" PROMPT "View"      ;
      NOBORDER TRANSPARENT ACTION ( lView := .T. , oDlg:End )                ;
      MESSAGE "Preview the report, with an option to print"

   oView:cToolTip := "Preview the report, with an option to print"

   REDEFINE BTNBMP oPrint ID 351 of oDlg RESOURCE "HRPRINT" PROMPT "Print"   ;
      NOBORDER TRANSPARENT ACTION ( lPrint := .T. , oDlg:End )               ;
      MESSAGE "Print the report without previewing"

   oPrint:cToolTip := "Print the report without previewing"

   REDEFINE BTNBMP oExit ID 352 of oDlg RESOURCE "HREXIT" PROMPT "Cancel"    ;
      NOBORDER TRANSPARENT ACTION ( oDlg:End )                               ;
      MESSAGE "Cancel the print operation "

   oExit:cToolTip := "Cancel the print operation "

   oExit:lCancel := .T.

   ACTIVATE DIALOG oDlg CENTERED

   oBrush:End()
   oFont:End()
   oBold:End()

   IF lView .AND. nPrn = 2 // View and select printer
      prnmeth := 1
   ELSEIF lView .AND. nPrn = 1 // View and default printer
      prnmeth := 2
   ELSEIF lPrint .AND. nPrn = 2 // Print with selection
      prnmeth := 3
   ELSEIF lPrint .AND. nPrn = 1 // Print to default
      prnmeth := 4
   ENDIF

RETURN( prnmeth )

/* // TIMSTON2.RC file
PRNSELW DIALOG 136, 106, 230, 90
STYLE DS_ABSALIGN | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION
CAPTION "Printer Selection Options"
{
 CONTROL "Use DEFAULT Printer", 353, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 57,10,108,12
 CONTROL "Select an ALTERNATE Printer", 354, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 57, 25, 167, 12
 PUSHBUTTON "", 350, 35,40,40,40
 PUSHBUTTON "", 351, 95,40,40,40
 PUSHBUTTON "", 352, 155,40,40,40
}
*/


// FIN / END - kapiabafwh@gmail.com
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7826
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Checkbox text disappears

Postby karinha » Tue Oct 25, 2022 11:53 pm

Image:

https://imgur.com/09pog3N

Image

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7826
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Checkbox text disappears

Postby TimStone » Wed Oct 26, 2022 12:20 am

Thank you for the suggestion.

I'm rather concerned that coding which worked fine for 15 years suddenly needs to be rewritten to make checkboxes and radio boxes start working again. This is a lot of additional code. I have many places where I reuse radio buttons and checkboxes throughout my program, and they would all need to be recoded to handle this. That just doesn't seem like the best option.

Anyone else ?
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: Checkbox text disappears

Postby TimStone » Wed Oct 26, 2022 12:35 am

With further testing, this is only happening with 64 BIT builds. ( FWH 64 ) that are created in the Visual Studio 2022 IDE.

It does NOT occur in 32 bit builds using the same tool.

Maybe that helps. Since distribution copies will not have the problem, I can live with it, but there is apparently a configuration issue with my 64 bit builds using the IDE.

Any thoughts ? ( Perhaps no one is doing it that way so you haven't experienced it ).

Thanks.
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: Checkbox text disappears

Postby Silvio.Falconi » Wed Oct 26, 2022 7:54 am

TimStone wrote:Silvio,

Nope ... the only thing that happens is the field space for the text does not allow the background to come through, so it's an ugly display.

Tim


I correctly use the one Manifest provided with the fwh package, in my case of the famous dialog viewtopic.php?f=3&t=42287&start=0 where part of the say and tgroup controls was hidden it was because I used the TRANSPARENT clause to the DIALOG, removed this the dialog worked well it may be that there is a bug to the RADIO MENU class which hides part of the say controls
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: Checkbox text disappears

Postby karinha » Wed Oct 26, 2022 12:08 pm

Buen día. Prueba así:

Good Morning. Try like this:

Code: Select all  Expand view

// C:\FWH..\SAMPLES\TIMSTON3.PRG .and. TIMSTON3.RC

#include "FiveWin.ch"

STATIC lGxPrsnt

FUNCTION Main()

   LOCAL cWSshow := "W"

   SetBalloon( .T. ) // Balloon shape required for tooltips

   SkinButtons()

   PrnSel( cWSshow )

RETURN NIL

/*  FUNCTION prnsel
      Description: Printer selection control
      Date updated: 9/29/2007
*/

FUNCTION PrnSel( cWSshow )

   // Declare LOCAL variables
   LOCAL prnmeth := 0, oDlg, oRadOpt, lView := .F. , lPrint := .F. , nPrn := 1
   LOCAL cTitle := "Printer Selection Options"
   LOCAL oBrush, oView, oPrint, oExit, oFont, oBold
   LOCAL nDTxtColor := 192

   lGxPrsnt := .T. // Assign static values

   DEFINE BRUSH oBrush COLOR nRGB( 192, 192, 192 ) // Gris Claro.
   DEFINE FONT oFont NAME "MS Sans Serif" SIZE 00, -12 BOLD
   DEFINE FONT oBold NAME "MS Sans Serif" SIZE 00, -14 BOLD

   // Create the dialog
   IF cWSshow = "W"

      DEFINE DIALOG oDlg RESOURCE "PRNSELw" BRUSH oBrush TRANSPARENT         ;
         TITLE cTitle FONT oBold

   ELSE

      DEFINE DIALOG oDlg RESOURCE "PRNSEL" BRUSH oBrush TRANSPARENT          ;
         TITLE cTitle FONT oBold

   ENDIF

   oDlg:lHelpIcon := .F.

   // Create the radio control
   REDEFINE RADIO oRadOpt VAR nPrn ID 353, 354 OF oDlg UPDATE

   oRadOpt:aItems[1]:cTooltip := "Radio Color 1"
   oRadOpt:aItems[2]:cTooltip := "Radio Color 2"

   oRadOpt:SetFont( oFont )

   // Create the button controls
   REDEFINE BTNBMP oView ID 350 of oDlg RESOURCE "HRZMIN" PROMPT "View"      ;
      NOBORDER TRANSPARENT ACTION ( lView := .T. , oDlg:End )                ;
      MESSAGE "Preview the report, with an option to print"

   oView:cToolTip := "Preview the report, with an option to print"

   REDEFINE BTNBMP oPrint ID 351 of oDlg RESOURCE "HRPRINT" PROMPT "Print"   ;
      NOBORDER TRANSPARENT ACTION ( lPrint := .T. , oDlg:End )               ;
      MESSAGE "Print the report without previewing"

   oPrint:cToolTip := "Print the report without previewing"

   REDEFINE BTNBMP oExit ID 352 of oDlg RESOURCE "HREXIT" PROMPT "Cancel"    ;
      NOBORDER TRANSPARENT ACTION ( oDlg:End )                               ;
      MESSAGE "Cancel the print operation "

   oExit:cToolTip := "Cancel the print operation "

   oExit:lCancel := .T.

   ACTIVATE DIALOG oDlg CENTERED ON INIT CTRLS_COLORS( oDlg )

   oBrush:End()
   oFont:End()
   oBold:End()

   IF lView .AND. nPrn = 2 // View and select printer
      prnmeth := 1
   ELSEIF lView .AND. nPrn = 1 // View and default printer
      prnmeth := 2
   ELSEIF lPrint .AND. nPrn = 2 // Print with selection
      prnmeth := 3
   ELSEIF lPrint .AND. nPrn = 1 // Print to default
      prnmeth := 4
   ENDIF

RETURN( prnmeth )
// By Giovanny Vecchi - TESTRAD.PRG
FUNCTION CTRLS_COLORS( f_oDlgContainer )

   LOCAL lc_aCtrls := {}, lc_iFor := 0
   LOCAL lc_aItemsRadio := {}

   lc_aCtrls := f_oDlgContainer:aControls

   FOR lc_iFor := 1 TO Len( lc_aCtrls )

      IF ValType( lc_aCtrls[lc_iFor] ) == "O"

         IF lc_aCtrls[lc_iFor]:ClassName() == "TRADIO"

            aEval( lc_aCtrls[lc_iFor]:oRadMenu:aItems,                 ;
                   {|_oRadId|{ SetWindowTheme( _oRadId:hWnd, "", "" ), ;
                   _oRadId:SetColor( CLR_CYAN, CLR_WHITE ) } } )
                   
         ELSEIF lc_aCtrls[lc_iFor]:ClassName() == "TCHECKBOX"

            // SetWindowTheme( lc_aCtrls[lc_iFor]:hWnd, "", "" )

            // lc_aCtrls[lc_iFor]:SetColor( G_COLOR_SYS( 31 ), G_COLOR_SYS( 1 ) )

         ENDIF

      ENDIF

   NEXT

RETURN NIL

/* // TIMSTON3.RC file
PRNSELW DIALOG 136, 106, 230, 90
STYLE DS_ABSALIGN | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION
CAPTION "Printer Selection Options"
{
 CONTROL "Use DEFAULT Printer", 353, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 57,10,108,12
 CONTROL "Select an ALTERNATE Printer", 354, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 57, 25, 167, 12
 PUSHBUTTON "", 350, 35,40,40,40
 PUSHBUTTON "", 351, 95,40,40,40
 PUSHBUTTON "", 352, 155,40,40,40
}
*/


// FIN / END - kapiabafwh@gmail.com
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7826
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 89 guests