Missing Background of a new added Radio-Item ?

Missing Background of a new added Radio-Item ?

Postby ukoenig » Wed Jun 09, 2010 10:49 pm

Hello,

I have to add a new Item to a existing Radiomenu.
I tested Sample < Testrad2.prg > it works, but there is a missing background of the added Item.

Image

function Main()
local nValue := 3, oRad

SET _3DLOOK ON
SET HELPFILE TO "Test.hlp"

DEFINE DIALOG oWnd PIXEL ;
TITLE "Testing a Radio Buttons Menu" COLOR "N/W"

@ 1, 1 BUTTON "&Test" SIZE 70, 20 ;
ACTION ( MsgInfo( nValue ), oRad:aItems[ 2 ]:SetText( "&Changed!" ) )

@ 70, 50 RADIO oRad VAR nValue PIXEL ;
ITEMS "&One", "&Two", "T&hree" _3D SIZE 50, 25 ;
HELPID 100, 101, 102 ;
ON CHANGE MsgBeep()

// adding an extra radio item at a different location
@ 100, 100 RADIOITEM "Fo&ur" RADIOMENU oRad OF oWnd SIZE 50, 25 PIXEL

ACTIVATE DIALOG oWnd CENTERED ;
ON INIT oWnd:SetSize( 400, 350 )

return nil

After changing Radio-Item-locations in DESIGN-Mode, I must write the new Code
with the Values from the Browser.

Image

Radio-Menu with 4 new Item-locations
================================
nRadio1T := LTRIM( STR( oRadio1:aItems[ 1 ]:nTop ) )
nRadio1L := LTRIM( STR( oRadio1:aItems[ 1 ]:nLeft ) )
nRadio1W := LTRIM( STR( oRadio1:aItems[ 1 ]:nWidth ) )
nRadio1H := LTRIM( STR( oRadio1:aItems[ 1 ]:nHeight ) )

nRadio2T := LTRIM( STR( oRadio1:aItems[ 2 ]:nTop ) )
nRadio2L := LTRIM( STR( oRadio1:aItems[ 2 ]:nLeft ) )
nRadio2W := LTRIM( STR( oRadio1:aItems[ 2 ]:nWidth ) )
nRadio2H := LTRIM( STR( oRadio1:aItems[ 2 ]:nHeight ) )

nRadio3T := LTRIM( STR( oRadio1:aItems[ 3 ]:nTop ) )
nRadio3L := LTRIM( STR( oRadio1:aItems[ 3 ]:nLeft ) )
nRadio3W := LTRIM( STR( oRadio1:aItems[ 3 ]:nWidth ) )
nRadio3H := LTRIM( STR( oRadio1:aItems[ 3 ]:nHeight ) )

nRadio4T := LTRIM( STR( oRadio1:aItems[ 4 ]:nTop ) )
nRadio4L := LTRIM( STR( oRadio1:aItems[ 4 ]:nLeft ) )
nRadio4W := LTRIM( STR( oRadio1:aItems[ 4 ]:nWidth ) )
nRadio4H := LTRIM( STR( oRadio1:aItems[ 4 ]:nHeight ) )

I have to write the new Code for the Radmenu on a new Location :

oText:Add("@ " + nRadio1T + "," + nRadio1L + " RADIO oRadio1 VAR nRadio OF oWnd PIXEL ;" )
oText:Add('ITEMS "&Gradient" _3D SIZE ' + nRadio1W + "," + nRadio1H + " HELPID 100" )
oText:Add("@ " + nRadio2T + "," + nRadio2L + ' RADIOITEM "&Color" RADIOMENU oRadio1 ;
OF oWnd SIZE ' + nRadio2W + "," + nRadio2H )
oText:Add("@ " + nRadio3T + "," + nRadio3L + ' RADIOITEM "&Image" RADIOMENU oRadio1 ;
OF oWnd SIZE ' + nRadio3W + "," + nRadio3H )
oText:Add("@ " + nRadio4T + "," + nRadio4L + ' RADIOITEM "&Brush" RADIOMENU oRadio1 ;
OF oWnd SIZE ' + nRadio4W + "," + nRadio4H )

Best Regards
Uwe :roll:
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

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], wmormar and 85 guests