LabWindows/CVI Idea Exchange

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 
Post an idea

Using CVI I can't find an easy way of moving inside a source code file.

Based on my experience with other C editors, I suggest these 3 little features that I think are really useful:

  • a shortcut to jump to the beginning of previous function in the same source file (CTRL + PGUP, for example)
  • a shortcut to jump to the beginning of next function in the same source file (CTRL + PGDWN, for example)
  • the current function where the caret is, displayed in the toolbar. It will be nice if you use a combo so that the user can jump to a different function with a simple mouse click (see attachment)

I have thease features in an open source C/C++ editor (Code::Blocks) I use for other projects, and I think they're really useful to reduce the coding time.

When you have large source files with a lot of functions, with CVI is't difficult to easily see where you are inside the file; moreover it's quite common scrolling the file jumping from a function to another.

In the project window you can organize the project files into some "virtual" folders (Source Files, Include Files, ...)

If you right-click on the project name, you can add a folder with the item "Add Folder...".

If you right-click on one of these folders, you can add one or more files files.

 

But it's impossible to create a subfolder of one of these folders.

 

Every large project has a lot of files (sources, ini-files, images, icons, ...), so I think it's quite common having them saved into different "real" folders and subfolders. If you don't explicitly add these files to the project, you can add them to the distribution kit browsing your hard disk "real" folders, but in this situation the absolute path of the files is used. And if you move all your project from a PC to another one you won't be able to recreate the distribution kit without errors if you don't save the whole project to the same folder you use in the first PC.

And this is a really big problem.

For files explicitly added to the project, instead, the relative path is used, and this is OK, so the best situation is to add all the files in the project window.

So it's necessary create a full structure of virtual folders and subfolders.

The additional columns of a tree can be hidden using SetTreeColumnAttribute() with ATTR_COLUMN_VISIBLE parameter. This is an easy and effective way.

For a table this attribute isn't supported, so you can use some workaround that requires more coding and have some disadvantages (for example if you set the width to the minimum value of 1, the user can increase it with the mouse...).

I think that the ATTR_COLUMN_VISIBLE parameter would solve this needs in the perfect way.