RADIO CLASS

RADIO CLASS

Postby Silvio » Sat Jan 13, 2007 12:09 am

I trying to inser two items radio in a line

but I not want use redefine (resources)
if you see testrad5.prg you can see the radio in two lines I want a radio control with two item in only a line : it is possible ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Antonio Linares » Sat Jan 13, 2007 8:07 am

Silvio,

You can change the position of any radio control this way:

oRadMenu:aItems[ n ]:nTop = ...
oRadMenu:aItems[ n ]:nLeft = ...
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Silvio » Sat Jan 13, 2007 10:39 am

THANKSSSSSSSSSSS Antonio!!!!!!!!!!!!
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Otto » Thu Dec 06, 2007 3:28 pm

Hello Antonio,
I tried:
ON INIT (oRadMenu:aItems[ 1 ]:SetText( "Hello" ), oRadMenu:aItems[ 1 ]:nLeft = 25)
But the position of aItems[1] does not change.
How do I use nLeft?
Thanks in advance
Otto



// Radio Buttons management sample

#include "FiveWin.ch"

//----------------------------------------------------------------------------//

function Main()

local oDlg, oRadMenu, oBrush
local nOption := 2

SET _3DLOOK ON

DEFINE DIALOG oDlg RESOURCE "Radios"

REDEFINE RADIO oRadMenu VAR nOption ID 110, 120, 130, 140, 150 OF oDlg ;
ON CHANGE MsgInfo( "select" ) // Beep()

REDEFINE BUTTON ID 100 OF oDlg ACTION oRadMenu:GoNext() ;
WHEN nOption == 3

REDEFINE BUTTON ID 102 OF oDlg ACTION oRadMenu:GoPrev()

ACTIVATE DIALOG oDlg CENTERED ;
ON INIT (oRadMenu:aItems[ 1 ]:SetText( "Hello" ), oRadMenu:aItems[ 1 ]:nLeft = 25)

SET _3DLOOK OFF

return nil

//----------------------------------------------------------------------------//

procedure AppSys // XBase++ requirement

return
User avatar
Otto
 
Posts: 6327
Joined: Fri Oct 07, 2005 7:07 pm

Postby Antonio Linares » Thu Dec 06, 2007 5:23 pm

Otto,

You are missing the ":" of the assigment:

ON INIT (oRadMenu:aItems[ 1 ]:SetText( "Hello" ), oRadMenu:aItems[ 1 ]:nLeft := 25)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Otto » Thu Dec 06, 2007 5:57 pm

Thank you, Antonio.
I copy and paste it from a forum tip of ??? :) without looking.

Regards,
Otto
User avatar
Otto
 
Posts: 6327
Joined: Fri Oct 07, 2005 7:07 pm


Return to FiveWin for Harbour/xHarbour

Who is online

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