In the screenshot below we see the (useful!) source code for an XYPlot chart. The problem is - well if I were to actually want to use the code .. how to do it? Notice that the Edit menu item is disabled. So presumably there may have been cut and paste there .. but ..
So is there a workaround for this (well .. besides whipping out iTerm, cutting to the directory of the source and launching vim manually ..)
This is an oversight in the demo application. The 'Edit' menu is used to copy and paste chart images when charts are being viewed. The menu is disabled for the other tabs.
It does, of course, make sense that the user should be able to copy and paste the demo source code from the 'Source Code' tab rather than be required to find the relevant source file in the download. I will update the code to enable this.
I tried to fix this in source code. However the whole ant/build.xml and even the codebase are broken in multiple ways.. See here: JFreecharts Demo Code does not build? . I have contacted Object Refinery about a series of issues in their demo build script and setup.
Related
I have IAR Embedded Workbench - ARM 8.20.2 in a production environment and it looks like someone hit something causing the menu bar to be hidden. There are no obvious hamburger menus, dropdowns, etc that I can click on to easily get it back, just a blank barren menu area without a contextual (right click) menu. just above the usual IAR tool bar. I would normally look at the IAR key bindings to figure this out, but.. there's no menu and can't find a shortcut for that. I've spent awhile now googling this without any luck. Does anyone out there know if there is a shortcut for toggling the menu bar?
Thanks,
Matt
I was able to resolve this issue by deleting the PROJECT_NAME.wsdt file from the settings folder in the projects. Thank you to both #user694733 and #Clifford for their help with this.
I found that the menu bar missing applied to all projects in a workspace. To fix it, exited IAR workbench, and deleted the .wsdt file in the workspace folder. Then restarted IARWorkbench and loaded the workspace file. I found that the workspace was reset for all projects in that workspace, and the menu bar was present as expected. Problem solved. Thanks for the previous post about the .wsdt file.
The file Project.wsdt resides in a directory called "settings".
If deleting only the file doesn't help, close the software, delete the entire directory (or rename it, to be on the safe side), and then open the project again.
I followed draft-js document to create a very simple demo of draft-js.
Everything seems work well, but when I open the url in Chrome, I can only see a white blank page (there is a hidden editor component there but is not visible)
There is no error on the console of the browser.
The demo project is here: https://github.com/js-demos/react-draft-js-demo, you can clone it and follow the readme to run it.
I have reviewed the code very carefully, but can't figure out why.
If you just use the sample code on the official website of Draft.js, you will see nothing on the page. It's just a blank text input field. If you click that field, you could type something. Draft.js is not a out of the box plugin, but a "a framework for building rich text editors in React".
Hope you figured it out, if not (or for anyone else), the solution for me was two step:
Download the Draft.css file and include it in your source code.
Reference said file in your index.html as such:
<link rel="stylesheet" href="./src/components/Draft.css" />
In other words, your problem was to do with the styling of the Draft-js Editor, since for you the editor was 'hidden' i.e. without any discernible box around it etc.
Actually, I tried a lot to solve this problem but in vain. What I did is using another package that is built on the top of draft js, and It's working fine.
you can find it here:https://jpuri.github.io/react-draft-wysiwyg/#/
I'm no genius, but might I recommend this:
https://www.youtube.com/watch?v=XGxdCXyMC7k
In short, it looks like the default is just a Rich Text Editor enabler type thing. You want more of a single instance, like their demo in the 'Rich Styling' section of the docs.
Yesterday I edited a form in Visual Studio's form designer. When I returned to it today, the designer shows nothing. I can open the properties window, select all the different constituent components and edit their properties, but they do not show up. The application builds fine and the form can be run as usual.
I've tried a couple of different solutions, such as checking the .csproj file has the form.Designer.cs included, but nothing has worked.
Strangely, I did see this problem earlier in the week, but it fixed itself when I unlocked my computer after returning from a coffee break.
Any suggestions?
I face a similar problem in Visual Studio 2019.
To help others who may have this issue.
The problem is due to the class declaration in the Form1.cs file.
Please ensure public partial class Form1: Form class is the first-class declared in the file. No other class declaration should be on top of this.
As described in this answer: https://stackoverflow.com/a/40243490/8887398
Thanks,
Sankar
I had similar issues in VS2019. I resolved it by using:
Window > Reset Window Layout.
Then double clicked on the Form in the Solution Explorer.
Prior to this, double clicking the form was having no effect.
Weird, after trying for an hour I ended up solving the issue 30 seconds after posting this!
I edited the size property of an item on the form using the properties tab, saved the form, and then reverted the form.cs, form.designer.cs, and form.resx files to the latest source control version.
At this point the form jollily re-appeared.
Edit: FWIW, this didn't work with another form which was exhibiting the same problem.
Edit 2: That other form has now fixed itself after coming back from lunch and unlocking my PC... Might be something to do with how that affects the display - everything shifts over to my right hand monitor when I do that.
Edit 3: OK, now it seems that modifying my display DPI fixes it. On Windows 10 go to System Settings -> Display, and then move the "Change the size of text: 100%" option to say 200%. Once this changes on screen, move it back to 100%.
This seems quite foolproof, although you sometimes have to jimmy it around a lot before it finally works. I know it has worked when I get both a vertical and horizontal scrollbar; the form is then further down the page.
Just go to Form1.cs (Form1 is the name of your form), if you are able to see your source code then press Shift + F7. The form will show up.
I also had a similar issue in VS2019.
My form [Design] was listed in the solution explorer but the code was not listed as a sub-item of that form.
I could access the code by right-clicking on the form in the solution explorer and choosing view code.
What seemed to solve the problem was to close down VS2019 and simply re-open it up.
A Message appeared (with Errors and Warnings) for me which said that the first mentioned class in a cs code file must be the form class. I shifted my form class to the top of the files and everything was fine.
There are actually a few reasons that one might encounter this issue.
At times, it can be due a problem within the VS IDE and the way it incorrectly manages file types and subtypes. It normally does a great job with this "automagically", but it can also make painful and unexpected mistakes.
If you right-mouse-click (RMC) your Project, and unload it (not your solution) you will be able to RMC it again and choose "Edit Project File". Once there, search for your Form name. In my case, I will search for Form1.cs, note the incorrect icon I saw in the Solution Explorer View, and the code describing my form, within the project file:
<...>
<Compile Include="Form1.cs"/>
<...>
Change this declarative statement to the following, adding the "Form" subtype:
<...>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<...>
Save your project file, then RMC on your project name in the Solution Explorer, choose "Reload Project", and you will see the correct icon as expected, and once again be able to use the form in Design mode:
*Note: This issue shouldn't occur with default forms (named Form1, Form2, etc) and even in my case, it happened with a form I named other than the default form name. I used that name in this example, purely for illustrative purposes.
Hopefully, this helps someone.
Wishing you all the best!
I hadn't changed anything that would have broken my form, yet it still wouldn't load when I tried view designer. Restarted VS2019 and it worked after that. Give that a go before you try anything else!
I had the same problem.
My solution was to remove and add again the System.Windows.Forms reference.
Go to Tools > Options > Environment > Preview Features and select the Use the preview Windows Forms designer ...
Then restart
OK, so I have built a Windows Form application. I now want an icon for it. So I use the Icon Editor built into Visual Studio 2012. Draw it all out to look nice and purdy. Once I am done, I have a .ico file and I make it the default icon for the project, and also the icon for the one WinForm in the application.
Unfortunately, it does not show up as I have created it! It is displayed as the default icon file as it existed before I modified it in the icon editor. It's a 32x32 4 bit icon. If I change the extension to .bmp it shows up as the default.
It looks like the VS icon editor is editing something else, not the appearance of the icon. Can someone tell me what I am doing wrong?
I used to have a progam called IconArt that would create icons that looked like icons when I used them in VS. IconArt is now abandonware and won't run on my 64bit Windows workstation.
Since I didn't get any answers within the time I was hoping, I posted this question also in the MSDN Visual Studio forum, and got a good answer that I thought I should post here. Credit to Reed Copsey, Jr, for the answer!
This is it:
You'll need to put your design in all of the different versions. ICO
files contain multiple versions of the same image, for different
screen resolutions.
My personal preference is to not use VS - there's an ICO plugin for
Paint.Net (all free) which allows you to make a single image
(typically 256x256), and save multiple versions within an ICO file in
one shot. It's very useful for building icons.
See
http://forums.getpaint.net/index.php?/topic/927-icon-cursor-and-animated-cursor-format-v37-may-2010/
for the plugin.
Since I am a Paint.Net user, the plugin sounded like a great idea, and I tried it. Bingo! This works very nicely.
Normally when we add new rows to a .resx file, say Resources.resx, in the IDE's resource editor, the code-behind file, say Resources.Designer.cs, will be automatically updated - adding new properties for the new rows.
But in my situation, that automation has stopped working. Have you met the same problem? If you do, please help me to get .resx back to work :)
Thank you!
A very similar problem arises with aspx/ascx files. This involved deleting the designer and then clicking "convert to web application" to force code gen of the designer again. Don't know if a similar facility exists for the resx.
Here what I found that works:
Delete the Resources.Designer.cs file
In Solution Explorer, exclude the Resources.resx
Then, show all files, re-include the Resources.resx.
The Resources.Designer.cs file should be recreated then.
Reset the 'Access Modifier' to be 'Public' (see details here)
Right click Resources.resx in Solution Explorer and click Run custom tool
Hope this would be helpful to you!