FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Modify Radio to fill more than one option
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Modify Radio to fill more than one option
Posted: Sun Apr 18, 2010 11:26 PM
Hello James,

my Customers like my Radio-replacement.
I can define any Size and Color, Tooltips, changing Color / Image on < Pressed >.
As well the Textcolor-change is working ( using Radios, it is black )
Changing the Font-Size, You get a Zoom-effect on Focus.
Is there maybe a Reason, not to use it like shown ?

Radio-Replacement :


Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Modify Radio to fill more than one option
Posted: Mon Apr 19, 2010 12:59 AM

Uwe,

>Is there maybe a Reason, not to use it like shown ?

There is an issue if you want to use 400 of them on a single dialog. There is limit to how many controls can be used (I can't remember what the limit is).

Is your radio replacement a single control, or are each of the buttons a single control?

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 389
Joined: Mon Oct 13, 2008 11:26 AM
Re: Modify Radio to fill more than one option
Posted: Mon Apr 19, 2010 01:54 PM
James Bott wrote:If you want to use radios like this, then I think your only choice is to create a new subclass of TRadio that works the way you want.

James



This is exact what I want, but I don't know why

Uwe, thanks for the sample, when I have some free time I'll test it. Just one question, what version of FW I need to run the sample, my license is 9.06.
Email: SamirSSabreu@gmail.com
xHarbour 1.2.3 + Fwhh 20.2
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Modify Radio to fill more than one option
Posted: Mon Apr 19, 2010 11:21 PM
Version FWH 9.06 will be OK, using BtnBMP.
I created a Group of Buttons ( BtnBMP ), to simulate the Radios.
Each Button-Click-Selection assimilates the Status of the other Buttons.

I still added a PopUp-Menu for each Option.
If it is possible, using normal Radios to show a Popup ???, I don't know.
Both : Left MouseClick for Action and Right MouseClick for PopUp changes the Image and Font.



Best Regards
Uwe :-)
Since 1995 ( the first release of FW 1.9 )

i work with FW.

If you have any questions about special functions, maybe i can help.
Posts: 389
Joined: Mon Oct 13, 2008 11:26 AM
Re: Modify Radio to fill more than one option
Posted: Tue Apr 20, 2010 06:06 PM

Do you know how many objects an dialog can hold?

Because just the button will be 400! Beside captions and other objects...

Email: SamirSSabreu@gmail.com
xHarbour 1.2.3 + Fwhh 20.2
Posts: 389
Joined: Mon Oct 13, 2008 11:26 AM
Re: Modify Radio to fill more than one option
Posted: Tue May 11, 2010 07:43 PM
I found the solution
Code (fw): Select all Collapse
oRadio:aItems[1]:Check()
oRadio:aItems[2]:Check()
oRadio:aItems[3]:Check()

In the method bChange I call the MultiFill procedure

Ex.:

   Redefine Radio    oRdBtn;
            Var      nOption;
            ID       141,142,143;
            Update;                 
            of       oDlg
   
   oRadio:bChange := {|| MultiFill(oRdBtn,nOption)
/*--------------------------------------------------------------------------------*/
Procedure MultiFill(oRadio,nVal)
Local i := 1

   For i := 1 to Len(oRadio:aItems)
      If i <= nVal
         oRadio:aItems[i]:Check()
      else
         oRadio:aItems[i]:Uncheck()
      end
   end

Return nil
Email: SamirSSabreu@gmail.com
xHarbour 1.2.3 + Fwhh 20.2

Continue the discussion