CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2019
    Posts
    13

    Padding between text and radio button

    Plz find the below code in .rc file

    CONTROL "Prerna:", IDC_PRERNA, "Button", BS_AUTORADIOBUTTON | BS_LEFTTEXT | BS_RIGHT | WS_GROUP, 5,5,200,15

    Note : here Prerna is the text and after 10 pixel padding there is a automatic radio button.

    Requirement : I want padding between Prerna and Radio button approximately 50 pixel without drawing a customize radio button.
    Can anyone assist??

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: Padding between text and radio button

    I am afraid, you do need to owner draw it.
    Victor Nijegorodov

  3. #3
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: Padding between text and radio button

    Radio button is a standard control. Which API does not provide any means for tweaking the space between the dot and its label. Actually, this is what standard is really about.

    You want to freely change the spacing, you go with unlabeled radio button and separate label control aligned properly next to the button. However, that spacing thing will cost you an extra headache of handling keyboard accelerators to create an illusion of control integrity. Of course, if you do suppose the accelerators to be in use at all.

    Or you just add a number of spaces to the beginning of the button label to create the required offset.

    But as to me, the best would be to go with standard button look and feel. The lesson learned: Boring UI is way better than annoying-and-thus-hated UI.
    Best regards,
    Igor

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured