Modify Radio to fill more than one option

Re: Modify Radio to fill more than one option

Postby ukoenig » 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 :
Image

Best Regards
Uwe :lol:
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Modify Radio to fill more than one option

Postby James Bott » 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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Modify Radio to fill more than one option

Postby sambomb » Mon Apr 19, 2010 1: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
User avatar
sambomb
 
Posts: 388
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil

Re: Modify Radio to fill more than one option

Postby ukoenig » 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.

Image

Best Regards
Uwe :lol:
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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Modify Radio to fill more than one option

Postby sambomb » Tue Apr 20, 2010 6: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
User avatar
sambomb
 
Posts: 388
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil

Re: Modify Radio to fill more than one option

Postby sambomb » Tue May 11, 2010 7:43 pm

I found the solution
Code: Select all  Expand view

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
User avatar
sambomb
 
Posts: 388
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Marc Venken and 113 guests