Print Page | Close Window

## IMPRESSION ##### DELPHI INTEGRATION FLAWED ####

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=18432
Printed Date: 27 November 2024 at 7:05pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ## IMPRESSION ##### DELPHI INTEGRATION FLAWED ####
Posted By: DAVECQ
Subject: ## IMPRESSION ##### DELPHI INTEGRATION FLAWED ####
Date Posted: 24 May 2011 at 11:58am
I'm getting the distinct impression as good as codejock is .. the integration/support to Delphi users
could be a lot better/has major flaws in it!!

============================================================

I posted a item on the 15th March, 2011 - no response ....

{ AND }

I need to post a similar item today regarding the Statusbar - overriding the "PaneClick" event, same issue as 15th March item, albeit different area, but same principle .... see below

==

From CJ helptext (VB again! - no delphi!!)

[PaneClick Sample (Visual Basic)] This sample illustrates how to use the PaneClick event to display a dialog when a specific pane is clicked. This sample assumes there is a form names frmProperties.frm.
Private Sub StatusBar_PaneClick(ByVal Pane As XtremeCommandBars.StatusBarPane)
    Debug.Print "PaneClick. Id = "; Pane.Id
    'Display a properties dialog if the StatusBarPane with ID ID_INDICATOR_ICON was clicked
    If (Pane.Id = ID_INDICATOR_ICON) Then
        frmProperties.Show 0, Me
    End If
End Sub

Question to 15th March 2011 .... and the one above:
  HOW DO YOU DO THIS IN DELPHI??????????????

  I feel you cannot, and therefore this is a major problem to delphi developers ... but I do hope I'm wrong Embarrassed ....






 



Replies:
Posted By: Aaron
Date Posted: 24 May 2011 at 2:42pm

Hi Dave,

I'm not a Delphi user but I'm always willing to help Wink

What is your problem? What doesn't work?
Show me what you have sofar...
 
Thanks
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: DAVECQ
Date Posted: 25 May 2011 at 4:43am
Hi Aaron,
thanks for the swift reply, and offer for help.

My problem is this :-

{our delphi snippet}

.... 
with StatusBar do
    begin 
          // add the first panel ..
          addpane(0); 
         // add the second
         with addpane(ID_SB_CQ_1);  ) do begin button := TRUE; end; 
         // others
          addpane(ID_SB_CQ_2);  // date
          addpane(ID_SB_CQ_3);  // time
          addpane(ID_SB_CQ_4);  // user info
    end
...

The problem is trying to "react" to the user click event when Pane id ID_SB_CQ_1 is "clicked" by the user. As you can see setting the button property on means I want it to act like a button, and visually everything looks great

the problem is when the user clicks the button, I have no way of knowing this has happened!!!

IStatusBarEvents exists and has two events called:-
          procedure PaneDblClick(const Pane: StatusBarPane); dispid 1;
          procedure PaneClick(const Pane: StatusBarPane); dispid 2;

I should be able to declare my OWN function and add the code below to "point" the event to mine, but I cannot do this does for some reason ("the bug/Flaw with Delphi" - as you can see in the VB snippet its easy to do for VB) :-
.... 
with StatusBar do
    begin 
          // add the first panel ..
          addpane(0); 
         // add the second
         with addpane(ID_SB_CQ_1);  ) do begin button := TRUE; PaneDblClick := MyPaneDblClick; end; 
         // others
          addpane(ID_SB_CQ_2);  // date
          addpane(ID_SB_CQ_3);  // time
          addpane(ID_SB_CQ_4);  // user info
    end

// Override and Catch/react to the user clicking on Pane 2
procedure MYOWNPaneDblClick(const Pane: StatusBarPane);
begin
showmessage('User clicked Status Panel 2');
end;
...

FYI and Example, with Codejock you can use the above concept for other things, like the Commandbar itself, they work perfectly :-

...
OutlookCmdBar := TCommandBarsFrame.Create(OnForm);
       with OutlookCmdBar do
            begin
            Align := alTop; TabOrder := 1;
            OnExecute := MyCommandBarsFrame1Execute;
            OnResizeClient := MyCommandBarsFrame1ResizeClient;
            visible := true; EnableOffice2007Frame(false);
            end;
...

SO I HOPING Big smile this is possible for the STATUSBAR AND for the message I logged on 15th March 2011 - same issue, different component.

thanks for your Help
Dave Handshake







Posted By: Aaron
Date Posted: 20 June 2011 at 5:26am

Hi Dave,

I'm sorry but I didn't see your reply and I just got back from my holidays Wink

 
With VB I have to declare "StatusBar" like this:
 
Dim WithEvents StatusBar As XtremeCommandBars.StatusBar
 
WithEvents allows the events to be raised, like MouseDown and PaneClick etc etc. If I don't declare it like that, the events aren't raised. I don't know if this is possible with Delphi though... If not, suggest you have to search the internet for a solution.
 
Good luck
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: Aaron
Date Posted: 20 June 2011 at 7:47am

Hi Dave,

If you could drop a statusbar onto a form it would be same as you showed with CommandBars control, right? If you create instance of CommandBars.StatusBar class and add procedure (this is all guessing for me !!!)
 
procedure StatusBarPaneClick(Sender: TObject);
 
(just copied your above code)
 
StatusBar := TCommandBarsFrame.StatusBar.Create(OnForm); //OnForm means an object on the form itself ??? If so create an instance of the CommandBars.StatusBar class (don't know how with Delphi...)
       with StatusBar do
            begin
            OnPaneClick := MyOwnPaneClickEvent;
            end;
 
You have to be really smart working with this language LOL Seems it isn't easy to get events from COM objects. I googled a bit:
 
http://www.gtro.com/delphi/comevents_e.php - http://www.gtro.com/delphi/comevents_e.php
http://www.techvanguards.com/products/eventsinkimp/ - http://www.techvanguards.com/products/eventsinkimp/
 
maybe you understand what they are talking about Wink 
 
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: Carlos Rocha
Date Posted: 28 June 2011 at 2:34pm
Hi Dave,

Using Visual Objects I have the same problem (along with some others). I solved the StatusBar events catching with an ActiveX wrapper of the StatusBar object made with VB6.

uploads/3743/CJHelper.zip - uploads/3743/CJHelper.zip

I hope it can help you


-------------
SuitePro 20.3.0
OS: Windows 10
Language: Visual Objects 2.8



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net