Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - [SOLVED] FocusChanging Problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

[SOLVED] FocusChanging Problem

 Post Reply Post Reply
Author
Message
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Topic: [SOLVED] FocusChanging Problem
    Posted: 26 February 2010 at 2:39pm
Hi,

I'm trying to configure the ReportControl so that when you click on a Group row, it automatically collapses all other groups and expands only the group that you clicked. Row focus should then switch to the first child of the selected group.

I've got this working OK, except that it seems the the FocusChanging event doesn't fire for the first group row.

Here's a sample:

uploads/20100226_143421_RcFocusChanging.zip

click each group row to see what I mean.

Next, I'd like to ensure that one group row is always expanded - the user can shrink/expand group rows by clicking the glyph OR double-clicking the group row. Is there a way to prevent this? I don't see any events that allow us to cancel collapse/expand (but maybe I've just missed it) - or maybe there's a property that I haven't found?

Thanks.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 26 February 2010 at 2:50pm
Okay for part 2, I've found the RowExpanded event, I'll try working with that.

I guess I need another coffee ;)
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 26 February 2010 at 3:04pm
Okay, RowExpanded does the trick, although I have to use a module level variable to alert the event when it is my code changing the Expanded property versus when the user is doing it.

A nicer solution would be to have a AllowGroupExpand property that when set to false prevents the user from expanding and collapsing groups (but allows code to do it). It would also hide the +/- glyph so the user wouldn't wonder why it wasn't working.

Speaking of the +/- glyph, now that I've been able to cancel group expansion/collapse, is there a way to hide the glyph in the group row?
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 26 February 2010 at 6:42pm
Okay, I'm not sure why FocusChanging wasn't firing for the first row before, but it seems to be firing now. Sorry!
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 27 February 2010 at 12:20pm
There's a demo that does most of the initial post requirements available here: http://forum.codejock.com/forum_posts.asp?TID=16302
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.