|
I have started looking at using the Mozilla tools on both platforms, but I think that will be some work.
|
|
|
|
|
How extensive do you need the editor to be, i.e. support all forms or is it just going to be using a subset of HTML?
|
|
|
|
|
No, it only has to support enough HTML to allow the user to create documents, i.e. all normal formatting including table editing etc. and maybe some styles.
|
|
|
|
|
There's a RichTextBox control here (on CP) which supports some of this but will save it's output to HTML. Very basic but allows pictures, tables etc and I think supported some styles.
If I come across it again I'll let you know.
|
|
|
|
|
Hi,
I am working an application window program using .Net Framework SDK 2.0 but I having a problem that after I compile with the SDK 2.0, as I run the program, there are 2 windows appears together which are the blank console window and my desired application window.
Problem is when closing the console window, the application closes. But I still want the application window.
How to code it? Help Me...
|
|
|
|
|
I think you should change the way you comple ur code using csc.exe
you will be compiling ur code using
csc /target:exe yourfile.cs
You need to change ur command line option like,
csc /target:winexe yourfile.cs
|
|
|
|
|
|
Hello,
I have a problem, I have an application which is about 900x700 size by default, and it looks fine on a 1024x768 desktop resolution, but on computers where there is a 800x600 resolution set its huge, it event doesnt fit the screen.
So my question.. is there anyway to scale the mainform so that all its content will be scalled down or up too ?
|
|
|
|
|
nevermind Scale() does the trick
|
|
|
|
|
My program has different "modes". Each mode has its own control which inherits a base control. The base control has the base code which each control uses. The mode controls have different functionnality.
What i want to be able to do is change the mode, which means changing the control but without loosing the data/view which the control is using.
E.g: If your in Edit mode, you can switch to View mode but not have to re-create the data.
Im abit stuck on how i'd do this, as once you dispose of the control, you loose the data.
Any ideas are appreciated.
Regards,
Gareth.
|
|
|
|
|
Why disposing it? simply make it hidden. it will keep the data.
~~~ From Milano to The Hague, easy as it goes ~~~
|
|
|
|
|
Hello,
Hope I understand everything write.
You have a base Control (I name it ControlA) and two Controls (I name them ControlA1 and ControlA2) which inherit from ControlA.
You have for example a ControlA1 (I name it myControlA1) in your program(on your form) and at runtime it has to be changed to a ControlA2.
I think what you have to do in, this very special case, is to make a new instance of your ControlA2.
ControlA2 newControl = new ControlA2();
Then you have to, lets say downgrade, your ControlA1 to a ControlA Control.
ControlA oldControl = myControlA1 as ControlA;
Now you should copy (clone) the property values from oldControl to newControl.
Therefore the namespace "System.ComponentModel" is required.
PropertyDescriptorCollection pdcoldControl = TypeDescriptor.GetProperties(oldControl);<br />
PropertyDescriptorCollection pdcnewControl = TypeDescriptor.GetProperties(newControl);<br />
<br />
foreach(PropertyDescriptor pdoldControl in pdcoldControl)<br />
{
if((pdoldControl.Attributes.Contains(CategoryAttribute.Appearance) && pdoldControl.IsBrowsable)<br />
|| (pdoldControl.Attributes.Contains(CategoryAttribute.Behavior) && pdoldControl.IsBrowsable && pdoldControl.IsReadOnly==false))<br />
{<br />
PropertyDescriptor pdnewControl = pdcnewControl[pdoldControl.Name];<br />
pdnewControl.SetValue(newControl,pdoldControl.GetValue(oldControl));<br />
}<br />
}<br />
TypeDescriptor.Refresh(oldControl);<br />
TypeDescriptor.Refresh(newControl);<br />
<br />
newControl.Size = oldControl.Size;<br />
newControl.Text = oldControl.Text;
This code would of course look nicer in a method.
Now you can place the newControl, and remove and dispose the myControlA1.
This only works (if it works ) as long as your Form or parent control is in memory.
Hope that helped you.
All the best,
Martin
-- modified at 16:43 Friday 17th November, 2006
|
|
|
|
|
Martin, your code example doesnt work. It creates the control but doesnt show it. I've tried adding it to the Controls class, as well as Docking and BringToFront.
|
|
|
|
|
Hello,
I think I have to see the code to say more about that.
All the best,
Martin
|
|
|
|
|
SimulationModel newControl = new SimulationModel(session, true);<br />
EditModel oldControl = this as EditModel;<br />
<br />
PropertyDescriptorCollection pdcoldControl = TypeDescriptor.GetProperties(oldControl);<br />
PropertyDescriptorCollection pdcnewControl = TypeDescriptor.GetProperties(newControl);<br />
<br />
foreach (PropertyDescriptor pdoldControl in pdcoldControl)<br />
{<br />
if ((pdoldControl.Attributes.Contains(CategoryAttribute.Appearance) && pdoldControl.IsBrowsable)<br />
|| (pdoldControl.Attributes.Contains(CategoryAttribute.Behavior) && pdoldControl.IsBrowsable && pdoldControl.IsReadOnly == false))<br />
{<br />
PropertyDescriptor pdnewControl = pdcnewControl[pdoldControl.Name];<br />
pdnewControl.SetValue(newControl, pdoldControl.GetValue(oldControl));<br />
}<br />
}<br />
<br />
TypeDescriptor.Refresh(oldControl);<br />
TypeDescriptor.Refresh(newControl);<br />
<br />
newControl.Size = oldControl.Size;<br />
newControl.Text = oldControl.Text;<br />
<br />
oldControl.Dispose();<br />
Controls.Add(newControl);<br />
newControl.BringToFront();
|
|
|
|
|
Hello Gareth,
gareth111 wrote: this as EditModel
Ohhhhhh,
You are inside of one derived class.
You have to be carefull there.
gareth111 wrote: oldControl.Dispose();
Controls.Add(newControl);
newControl.BringToFront();
//You have to place the new Control in the Parent Container(Controls) not in the oldControls Container(Controls).
if(Parent!=null)
{
Parent.Controls.Remove(this); //Remove oldControls(this)
Parent.Controls.Add(newControl); //Add newControl
Dispose(); //frees the memory
}
Hope it works! (please let me know)
All the best,
Martin
|
|
|
|
|
Hello Gareth,
Just saw you in the forum, whanted to know if this worked for you?
Martin
|
|
|
|
|
Martin,
After your post, my super visor decided we didnt need to implement it anymore, so i never got around to trying it. Thanks for your help anyways!
|
|
|
|
|
Hello all together,
I have a problem with my custom user control. It has some childcontrols (also usercontrols) which will be movable inbetween the custom control.
But I have some regions (Top and Left area) which should be tabu for it's childcontrols. So my question is, how can I set a ClipRectangle Region where childcontrols are allowed to be painted?
I solved temporarly this problem with calculating a Region area, if a childcontrols location is inbetween the "zone which is not allowed", but I have to check this Region each movement and will be very slowly.
So I would be pleased if someone could explain me a solution.
Thanks for replies.
With best regards
Norman-Timo
|
|
|
|
|
Hi,
Hope every one is doing fine... well I need a little help regarding FOLDER LOCK, by which I necessarily mean that on double clicking the folder my own custom exe could run and after doing some task, could finally open the folder upon successful authentication.
If any body could help me out... and secondly I am thinking about folder lock in terms of archiving files and then giving that archived file a custom extension... this could also solve the problem... I have to make a decision what to do... if any body has some idea to work around this issue I will be very thankful to him/her.
PS:I am using C#, .NET Framework 2.0.
Thanks...
Regards.
|
|
|
|
|
Hello Sir,
Did u find solution for your question?
If so, please let me know ..even i got stuck at this point.
Thank you
|
|
|
|
|
Guys,
I have multiple listviews on a form. I select one item of one listview (so far so good), but if I select an item from another listview, the item from the first listview is deselected. Is this some property setting? I couldn't found which one.
I want to select an item from each listview without deslecting the item when the focus moves.
Thanks!
Found it! mm to quick: HideSelection=false; doesn't seem to solve it
V.
Stop smoking so you can: enjoy longer the money you save.
|
|
|
|
|
I normally iterate through arraylists with a foreach loop. However im iterating to search for a certain item to remove from the arraylist and i cant iterate and remove the item when its found in the foreach loop becasue it throws an exception. my arraylist is holding a list of listview items and im going to use a for loop or while loop to remove it from the arraylist. my problem is that i dont know how to iterate through arraylists and extract a single item when im not using a foreach loop. can someone help me get the right syntax for this?
|
|
|
|
|
A solution may be copying the arraylist and iteration over the copied version
|
|
|
|
|
I never thought about doing that and it worked perfectly, and was extremely simple. Thanks!!!
|
|
|
|