It is currently Wed Jun 19, 2013 11:19 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 37 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: RMChart UserLib V4.12
PostPosted: Mon Feb 11, 2008 7:43 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1071
Location: Germany
Quote:
RMChart is a simple to use and really lightweight developer tool to create a various range of modern looking business charts - and it's freeware.


Current Version : V1.01

Download : http://www.purebasicpower.de/?RMChart

RMChart : http://www.rmchart.com

Know problems :
Quote:
- CloseWindow() should be called before program ends
- with enabled tooltips for datapoints the RMC_INFO structure in the callback will be empty

Image

_________________
http://www.PureBasicPower.de


Last edited by ABBKlaus on Tue Apr 06, 2010 11:28 am, edited 5 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 11, 2008 8:49 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9859
Location: Beyond the pale...
Looks very nice Klaus. Thank you very much.

_________________
I may look like a mule, but I'm not a complete ass.

eScript
Arctic Reports
nxSoftware


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 11, 2008 9:51 pm 
Offline
Addict
Addict
User avatar

Joined: Fri Jul 02, 2004 6:49 pm
Posts: 833
Location: Australia
I have a little project I made a few months back & haven't yet gotten around to releasing. I am atm using ".csv" for export to spreadsheets so people can make up whatever charts they want, but this looks like it may be that I need to add a few more charts to my program as a standard feature. I will have a serious play with this.

_________________
Microgateways


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 13, 2008 8:34 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 921
Location: Germany (Saxony, Deutscheinsiedel)
Now also added to the DLL and UserLibs sections on www.PureArea.net :D

_________________
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 14, 2008 6:17 am 
Offline
Enthusiast
Enthusiast

Joined: Thu Feb 16, 2006 1:41 am
Posts: 167
Location: New Zealand
Thanks ABBKlaus!


And thanks as well, Andre.

_________________
WinXP Pro-SP3, PB4, slow CPU, ancient video card, fuzzy monitor
"When the facts change, I change my mind" - John Maynard Keynes


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 14, 2008 12:32 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1071
Location: Germany
Andre wrote:
Now also added to the DLL and UserLibs sections on www.PureArea.net :D


Thanks, you´re doing a great job there :D

_________________
http://www.PureBasicPower.de


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 14, 2008 12:40 pm 
Offline
Addict
Addict

Joined: Mon May 29, 2006 1:01 am
Posts: 1966
Location: Outback
Yetta great release!

Thanks ABBKlaus.




@Baldrick

When I saw this guess what sprang to mind? :D

_________________
Dare2 cut down to size


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 14, 2008 12:59 pm 
Offline
Addict
Addict
User avatar

Joined: Fri Jul 02, 2004 6:49 pm
Posts: 833
Location: Australia
Dare wrote:
@Baldrick

When I saw this guess what sprang to mind?


Yep, you are spot on. :D
It's just that I am up to my neck in another app atm which I want to get running asap priority. ( That company I walked away from a few months ago I now hear rumours that they are in trouble with qualified personell as the last 2 "qualified" guys have just walked on them a few weeks back, so kinda wanna be ready to do it my way if they willing to swallow their pride & call me.. :twisted: )

_________________
Microgateways


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 14, 2008 3:06 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Nov 29, 2007 8:23 am
Posts: 195
This is the most impressive user contribution since eGrid :!:


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 21, 2008 9:13 am 
Offline
Addict
Addict
User avatar

Joined: Fri Jul 02, 2004 6:49 pm
Posts: 833
Location: Australia
Great Lib, I did have a small problem with it this afternoon when it kept crashing on me. This was because of the simplest tiniest little thing: You MUST call a CloseWindow(#Win) prior to ending, else it will simply lock up.
Had me buggered for quite a while this afternoon trying to work this simple thing out... :oops:
Code:
   #Title="Test"
   #Flags_Main=#PB_Window_MinimizeGadget|#PB_Window_ScreenCentered
   #Width=650
   #Height=580

Enumeration
   #Window_0
EndEnumeration

Enumeration 1
   #Chart_1
EndEnumeration

Enumeration 1
   #Region_1 
EndEnumeration

Procedure Make_Chart_1()
   If RMC_CreateChart(WindowID(#Window_0),#Chart_1,10,10,#width-20,#Height-20,9935799)=#RMC_NO_ERROR
    If RMC_AddRegion(#Chart_1,10,10,-5,-5)=#RMC_NO_ERROR 
     If RMC_AddGrid(#Chart_1,1,16711808,1)=#RMC_NO_ERROR   
      RMC_Draw(#Chart_1)
      ProcedureReturn 1
     EndIf
    EndIf
   EndIf 
EndProcedure

Procedure Open_WindowMain()
   If OpenWindow(#Window_0,0,0,#Width,#Height,#Title,#Flags_Main)
    If Make_Chart_1()
     ProcedureReturn 1
    EndIf
   EndIf
EndProcedure

   If Open_WindowMain()=0 
    End
   EndIf
   
   Repeat
    Ev.l=WaitWindowEvent()
     If Ev=#PB_Event_CloseWindow
      Select EventWindow()
       Case #Window_0
        Quit.l=1
      EndSelect
     EndIf
   Until Quit
   ;End ;uncomment this & program will crash
   CloseWindow(#Window_0) ; comment this out & program will crash

_________________
Microgateways


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 21, 2008 3:11 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1071
Location: Germany
Thanks Baldrick, i have added some known problems to the first post.

_________________
http://www.PureBasicPower.de


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 22, 2008 9:05 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jul 01, 2004 2:51 am
Posts: 905
Location: Tacoma, WA
Howdy,

What about when you nest a chart within a container gadget and then a panel gadget? I seem to lose events when I do that. The WM_COMMAND check doesn't work.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 22, 2008 11:37 pm 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1071
Location: Germany
Xombie wrote:
What about when you nest a chart within a container gadget and then a panel gadget? I seem to lose events when I do that. The WM_COMMAND check doesn't work.

Did you tried the other way around ?
First create the panelgadget and then the containergadget :
Code:
;XIncludeFile "RMChart.pbi"
;RMC_Init()

#ID_WINDOW = 1
#ID_CHART  = 1
#ID_REGION = 1
#ID_CONT1  = 1
#ID_PANEL1 = 2

Procedure MyCallback(hWnd, CBMSG, CBWPARAM, CBLPARAM)
  Protected *TINFO.RMC_INFO
  Protected CBCTL.w,CBCTLMSG.w
  Protected Text$
  Static z.l
 
  CBCTL = PeekW(@CBWPARAM+0)
  CBCTLMSG = PeekW(@CBWPARAM+2)
 
  Select CBMSG
    Case #WM_RBUTTONDOWN  ; right mouse button was clicked
      ; CBLPARAM holds always the X/Y-position within the dialog,
      ; even you've clicked onto the chart
      Text$="X-Pos in the dialog:"+Str(PeekW(@CBLPARAM+0))+Chr(13)
      Text$+"Y-Pos in the dialog:"+Str(PeekW(@CBLPARAM+2))
      MessageRequester("RMChart",Text$,0)
    Case #WM_COMMAND
      Select CBCTL
        Case #ID_CHART                     ;message from the chart control
          Select CBCTLMSG                  ;identify the message
            Case #RMC_LBUTTONDOWN          ;left mouse button
              z = 1                        ;set flag for left mouse button pressed
            Case #RMC_LBUTTONUP
              z = 0                        ;reset the flag for left mouse button pressed
            Case #RMC_CTRLRBUTTONDOWN      ;Ctrl and right mouse button
              *TINFO = CBLPARAM            ;CBLPARAM holds a pointer to a tRMC_INFO structure
              Text$="X-Pos in the chart:"+Str(*TINFO\nXPos)+Chr(13)
              Text$+"Y-Pos in the chart:"+Str(*TINFO\nYPos)
              MessageRequester("RMChart",Text$,0)
            Case #RMC_MOUSEMOVE            ;mouse was moved in the chart control
              Debug "#RMC_MOUSEMOVE"
              *TINFO = CBLPARAM            ;CBLPARAM holds a pointer to a tRMC_INFO structure
              If z                         ;if the left mouse button is pressed
                ;move the chart control within your dialog
                RMC_SetCtrlPos(#ID_CHART,*TINFO\nXMove,*TINFO\nYMove,1)
              EndIf
          EndSelect
      EndSelect
  EndSelect
 
  ProcedureReturn #PB_ProcessPureBasicEvents
EndProcedure

Procedure PBMain()
  If OpenWindow(#ID_WINDOW, 0, 0, 800, 600, "RMCHART.DLL", #PB_Window_SystemMenu|#PB_Window_ScreenCentered)
    If CreateGadgetList(WindowID(#ID_WINDOW))
      PanelGadget(#ID_PANEL1,0,0,800,600)
        AddGadgetItem (#ID_PANEL1, -1, "Panel 1")
        ContainerGadget(#ID_CONT1, 8, 8, 800-24, 600-40, #PB_Container_Raised)
        CloseGadgetList()
    EndIf
    If RMC_CreateChart(GadgetID(#ID_CONT1), #ID_CHART, 0, 0, 800, 600) = #RMC_NO_ERROR
      RMC_AddRegion(#ID_CHART, 5, 5, -5, -5,"Test")
      RMC_AddGrid(#ID_CHART, #ID_REGION)
      RMC_AddXAxis(#ID_CHART, #ID_REGION, #RMC_XAXISBOTTOM)
      RMC_AddYAxis(#ID_CHART, #ID_REGION, #RMC_YAXISLEFT)
      RMC_AddXYSeries(#ID_CHART, #ID_REGION, ?LabX, 10, ?LabY, 10, #Black, #RMC_XY_LINE, #RMC_LSTYLE_SPLINE,0,0,0,0)
      RMC_SetCaptionBGColor(#ID_CHART,#ID_REGION,0)
      RMC_Draw(#ID_CHART)
    EndIf
   
    SetWindowCallback(@MyCallback())
   
    Repeat
     Event=WaitWindowEvent()
     
     Select Event
       Case #PB_Event_Gadget
         ;Debug "Gadget "+Str(EventGadget())
         Select EventGadget()
         EndSelect
     EndSelect
    Until Event=#PB_Event_CloseWindow
   
    CloseWindow(#ID_WINDOW)
   
  EndIf
EndProcedure

PBMain()

DataSection
LabX: Data.d 10,20,20,30,40,50,60,70,80,90
LabY: Data.d 10,20,30,30,30,40,90,65,80,10
EndDataSection

_________________
http://www.PureBasicPower.de


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 22, 2008 11:49 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jul 01, 2004 2:51 am
Posts: 905
Location: Tacoma, WA
Thanks for the quick reply!

Unfortunately, this is just a part of a much larger program so doing it this way wouldn't work well in my situation.

What's the issue in this situation? Or, I mean, what causes the problem? Why does a container work in a panel gadget but not a panel gadget in a container? Knowing that will help me create a work-around. I'm thinking at the moment that I will probably have to just go without one or the other or may even both and just do a mass hide/show rather than relying on the container/panel to show and hide everything.

In fact... I think someone had some grouping code around here... (goes off to hunt)

Thanks again!


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 23, 2008 12:09 am 
Offline
Addict
Addict

Joined: Sat Apr 10, 2004 1:20 pm
Posts: 1071
Location: Germany
Xombie wrote:
Why does a container work in a panel gadget but not a panel gadget in a container?

Do you have some sample code that shows your problem.

_________________
http://www.PureBasicPower.de


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 37 posts ]  Go to page 1, 2, 3  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye