Paint with strange behavior

Paint with strange behavior

Postby hag » Tue Nov 15, 2011 6:01 pm

I'm trying to color a dialog. It colors fine except FOR THE oRadMenu. When I add TRANSPARENT to the define dialog to color the radios a strange problem occurs.

I click on a button to activate the dialog and if transparent is in the define dialog the program runs through the oRadMenu and excutes some of the oRadMenu
functions. After running the functions the dialog occurs and the color and paint perfect. It seems that the transparent causes each oRadmenu item to paint and execute amenuchoice().

Need to be able to stop this from happening.

Using Harbour FWH 2009


Code: Select all  Expand view  RUN

DEFINE DIALOG oDlg1 RESOURCE "newReports" OF oWnd1 font ofont7 title cTitle transparent
REDEFINE RADIO oradmenu var rchoice1 ID 121,99,101,102,103,104,105,106,108,;
107,110,111,123,124,118,112,113,114,115,116,119,117,122,125,126,127  ;
OF oDlg1 on click(AMENUCHOICE(rchoice1,ODLG1), rchoice1 := 1,odlg1:refresh(),oDlg1:setFocus(),.t.)

REDEFINE BUTTON ID 4002   OF oDlg1  ACTION (oDlg1:End()) //,iif(mvar,ofld:restore(),mvar := .f.))
REDEFINE BUTTON ID 4003   OF oDlg1  ACTION (setcalc(),quickprint(),printmenu())
REDEFINE BUTTON ID 100 OF oDlg1 ACTION (neworder(1))

ACTIVATE DIALOG oDlg1 centered on init(oDlg1:setfocus(),oDlg1:refresh())  on paint GradPaint2(hdc,oDlg1)


function amenuchoice(rchoice1,oDlg1)
   local nNumber  :=  0
   local cAccount
   local cAmount
   local cTitle

           
   if !isALIAS("company")
      use company   alias company new
   endif

   if company->series500 == 1
      gl->(dbseek("9801"))
      gl->a1  := 0
      gl->(dbseek("0125"))
      gl->a14 := 1
   endif

   if rchoice1 == 2
      setcalc()
      setminbal(1)
   endif
   if rchoice1 == 3
      setcalc()
      plbrow(.t.)
   endif

   if rchoice1 == 4
      setcalc()
      plqtr()
      select gl
   endif

   if rchoice1 == 5
      setcalc()
      select tot
      total(2)
      select gl
   endif

   if rchoice1 == 6
      setcalc()
      genesis2()
   endif

   if rchoice1 == 7
      setcalc()
      select tot
      set filter to
      set order to 1
      clentot()
      cftotal(1)
      cfqtr()
      select gl
   endif

   if rchoice1 == 8
      setcalc()
      select tot
      cftotal(0)
      select gl
   endif

   if rchoice1 == 9
      setcalc()
      indirect(.t.)
   endif

   if rchoice1 == 10
      setcalc()
      balbrows()
   endif

   if rchoice1 == 11
      setcalc()
      paywin()
   endif
   if rchoice1 == 12
      setcalc()
      termbrow(1)
   endif
   if rchoice1 == 13
      setcalc()
      termbrow(2)
   endif

   if rchoice1 == 14
      anote->(dbsetorder(2))
      notepad2()
   endif
   if rchoice1 == 15
      setcalc()
      cursorwait()
      comparepl()
      cursorArrow()
   endif
   if rchoice1 == 16
      setcalc()
      goforward := .F.
      bsenter(.F.)
      if goforward == .T.
         plan2actual(.t.)
      endif
   endif
   if rchoice1 == 17
      compplqtr()
   endif

   if rchoice1 == 18
      setcalc()
      ratiospread()
   endif

   if rchoice1 == 19
      setcalc()
      breven()
   endif

   if rchoice1 == 20
      setcalc()
      ratio(.f.,.t.)
   endif

   // sale by prod      20
   // sale by vs actual 21

   if rchoice1 == 21
      setcalc()
      pikprodmth()
   endif
   if rchoice1 == 22
      setcalc()
      goforward := .F.
      bsenter(.T.)
      if goforward == .T.
         plan3actual(.t.)
      endif
   endif


   if rchoice1 == 23
      setcalc()
      banker1()
   endif

   if rchoice1 == 24
      setcalc()
      goforward := .T.
      fivecol()
   endif

   if rchoice1 == 25
      setcalc()
      goforward := .T.
      ratioNew()
   endif

   if rchoice1 == 26
      setcalc()
      goforward := .T.
      bsActPlan()
   endif


   rchoice1 := 1

   return nil




    
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: Paint with strange behavior

Postby ukoenig » Wed Nov 16, 2011 12:32 pm

Hello Harvey,

I noticed 26 !!! Radios.
Maybe using xBrowse with a defined BMP for each selection, could be a better looking Solution ?
I can show a Sample, if needed.

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

Re: Paint with strange behavior

Postby hag » Thu Nov 17, 2011 5:00 am

uwe
A sample word be great. You can send it to
hgoldstein@dslextreme.com
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: Paint with strange behavior

Postby ukoenig » Thu Nov 17, 2011 2:52 pm

Harvey,

A complete Sample for the radio-replacement ( from Resources ) :
Dialog- and xBrowse-brushes included.
( maybe creating 2 browser to show all Selections, or using smaller Images )

Download ( 3.6 MB )
http://www.pflegeplus.com/fw_downloads/XbrwSelect.zip

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: Paint with strange behavior

Postby hag » Thu Nov 17, 2011 11:33 pm

Thanks Uwe
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: MaxP and 58 guests