Click here to Skip to main content
15,907,392 members
Home / Discussions / C#
   

C#

 
GeneralTreeView node right-clicked is not the "selected" node... Pin
rhoward5-Jun-02 10:43
professionalrhoward5-Jun-02 10:43 
GeneralRe: TreeView node right-clicked is not the "selected" node... Pin
James T. Johnson5-Jun-02 11:07
James T. Johnson5-Jun-02 11:07 
GeneralRe: TreeView node right-clicked is not the "selected" node... Pin
rhoward5-Jun-02 11:35
professionalrhoward5-Jun-02 11:35 
GeneralRe: TreeView node right-clicked is not the "selected" node... Pin
James T. Johnson5-Jun-02 12:39
James T. Johnson5-Jun-02 12:39 
GeneralRe: TreeView node right-clicked is not the "selected" node... Pin
rhoward5-Jun-02 13:50
professionalrhoward5-Jun-02 13:50 
GeneralRe: TreeView node right-clicked is not the "selected" node... Pin
David Wengier5-Jun-02 11:31
David Wengier5-Jun-02 11:31 
GeneralRe: SOLVED - TreeView node right-clicked is not the "selected" node... Pin
rhoward5-Jun-02 11:45
professionalrhoward5-Jun-02 11:45 
GeneralRepository controls not redrawing -tough one Pin
5-Jun-02 7:01
suss5-Jun-02 7:01 
I have component object that handles controls in a typesafe array like so
<br />
[Designer(typeof(ComponentGen.Repository.CompGenDesigner))]<br />
public class CompGen : System.ComponentModel.Component<br />
{<br />
/// The collection of controls this repository component will handle.<br />
private ComponentGen.Collections.CtrlCollection c_ctrls = null;<br />
...<br />
}<br />

when the controls are added to the component using the design wizard, the form's Initialize() event adds this code:
<br />
this.compGen1.RepositoryControls.AddRange(new System.Windows.Forms.Control[] { this.MASTER, this.CATEGORY, this.TEST_CODE});<br />
...<br />
<br />
			this.Controls.AddRange(new System.Windows.Forms.Control[] { this.MASTER, this.CATEGORY, this.TEST_CODE});<br />
...<br />

*MASTER, CATEGORY, and TEST_CODE are the generated controls (System...Control wrapped controls)

The problem
when the controls are first drawn, they show up perfectly drawn. when the form is closed and re-opened, the controls are not redrawn (transparent) but still exist and work perfectly when run.

The problem goes away when the controls are not added to the repository in that Initialize code.

Questions, Leads
-Do i have to override a paint or something in either the controls designer or the repository component?
-Why is simply adding references to the components in a collection stopping the form from repainting the controls?
Generalcomon now, lets see a little effort Pin
5-Jun-02 11:48
suss5-Jun-02 11:48 
GeneralRe: Repository controls not redrawing -tough one Pin
James T. Johnson5-Jun-02 12:36
James T. Johnson5-Jun-02 12:36 
GeneralRe: Repository controls not redrawing -tough one Pin
6-Jun-02 6:14
suss6-Jun-02 6:14 
GeneralAnswered. if anyone reads this far Pin
7-Jun-02 6:22
suss7-Jun-02 6:22 
GeneralPreserving thumbnail metadata Pin
dsweet5-Jun-02 6:14
dsweet5-Jun-02 6:14 
GeneralRe: Preserving thumbnail metadata Pin
James T. Johnson5-Jun-02 12:59
James T. Johnson5-Jun-02 12:59 
GeneralRe: Preserving thumbnail metadata Pin
dsweet6-Jun-02 5:22
dsweet6-Jun-02 5:22 
GeneralRe: Preserving thumbnail metadata Pin
James T. Johnson6-Jun-02 5:20
James T. Johnson6-Jun-02 5:20 
GeneralRe: Preserving thumbnail metadata Pin
James T. Johnson6-Jun-02 5:50
James T. Johnson6-Jun-02 5:50 
GeneralRe: Preserving thumbnail metadata Pin
dsweet6-Jun-02 6:51
dsweet6-Jun-02 6:51 
GeneralRe: Preserving thumbnail metadata Pin
James T. Johnson6-Jun-02 7:00
James T. Johnson6-Jun-02 7:00 
GeneralRe: Preserving thumbnail metadata Pin
dsweet6-Jun-02 7:22
dsweet6-Jun-02 7:22 
GeneralRe: Preserving thumbnail metadata Pin
dsweet6-Jun-02 13:50
dsweet6-Jun-02 13:50 
GeneralRe: Preserving thumbnail metadata Pin
James T. Johnson6-Jun-02 13:56
James T. Johnson6-Jun-02 13:56 
GeneralCall for help - Re: Preserving thumbnail metadata Pin
James T. Johnson6-Jun-02 14:01
James T. Johnson6-Jun-02 14:01 
GeneralRe: Call for help - Re: Preserving thumbnail metadata Pin
dsweet6-Jun-02 14:22
dsweet6-Jun-02 14:22 
GeneralRe: Call for help - Re: Preserving thumbnail metadata Pin
dsweet7-Jun-02 7:13
dsweet7-Jun-02 7:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.