Announcement

Collapse
No announcement yet.

invisible background on Radio button

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • invisible background on Radio button

    Anybody know a way of making invisible background on a Radio button?



    ------------------
    Henning
    Henning

  • #2
    I assume you mean transparent, rather than invisible?

    Just handle %WM_CTLCOLORSTATIC, exactly as shown in the SMTP.BAS example file:
    Code:
    ' The following line was originally a BUTTON in SMTP, but by 
    ' changing it to an OPTION button, you can see the transparent effect:
     CONTROL ADD OPTION, hDlgMain, %IDOK, "&Send", 275, 232, 40, 14, %BS_DEFPUSHBUTTON OR %WS_TABSTOP CALL OkButton
    ...
        CASE %WM_CTLCOLORSTATIC
          SelectObject CBWPARAM, hFont
          SetBkMode CBWPARAM, %TRANSPARENT
          SetTextColor CBWPARAM, %YELLOW
          FUNCTION = GetStockObject(%NULL_BRUSH)
    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Lance
    mailto:[email protected]

    Comment


    • #3
      Lance;

      I have tried producing a transparent background with the Radio button
      control and the checkbox and I couldn't get it to work.

      It does work with the Static control (I use them for Label controls),
      but not with other controls.

      Can someone show me a sample program where it works ?

      Maybe I did something wrong. I got it to work with the Static control
      but failed with the Radio button.



      ------------------
      Chris Boss
      Computer Workshop
      Developer of "EZGUI"
      http://cwsof.com
      http://twitter.com/EZGUIProGuy

      Comment


      • #4
        Chris, did you try that change "BUTTON" to "OPTION" in SMTP.BAS?

        ------------------
        Lance
        PowerBASIC Support
        mailto:[email protected][email protected]</A>
        Lance
        mailto:[email protected]

        Comment


        • #5
          chris -
          a sample in http://www.powerbasic.com/support/pb...ead.php?t=2221 is much shorter.

          but actually better to avoid "transparent" (not possible to use ws_clipschildren + not possible to change a text w/o whole redrawing).



          ------------------
          e-mail: [email protected]

          Comment

          Working...
          X