Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

colorbar in dialog?

zl963
Beginner
858 Views
Hi, all,

Now I am trying to use Quickwin to write a program that can load a grid set into client window and display color contour of variables at grid points. I want to add a colorbar into a seperate dialog, which allows me to move it freely for better view. As program permits user to specify variable range for colorbar, so the colorbar within dialog should be able to updated to indicate new variable range after users make specification. Is there any way to do it using QuickWin? Any help would be much appreciated!!

Thanks,

Zhen
0 Kudos
5 Replies
Intel_C_Intel
Employee
858 Views
Hi Zhen,
Are you using CVF or IVF? I think you should be able to use the Array Visualizer controls provided with IVF to display a contour plot and colorbar, but I'd need to learn more specifics before I could say so for sure.
John
0 Kudos
zl963
Beginner
858 Views
Thank you, John. I am using CVF 6.6a. In fact, I already wrote contour display part and it works quite well. But I simply do not know how to add colorbar in seperate window (or dialog?). I am wondering if there is any way to tackle it besides IVF array visualizer controls (my version is standard, does not come with array visualizer).

Zhen
0 Kudos
Jugoslav_Dujic
Valued Contributor II
858 Views
Well, what's a colorbar? From the description, it sounds like a control where you can pick up color range orsomething similar(I don't have AV installed), but I'd appreciate if someone could explain in more detail (or point to a well-known software with similar feature).
Jugoslav
0 Kudos
zl963
Beginner
858 Views
Hi, Jugoslav,

I attached one snapshot of my working window with colorbar on the top left corner. Now my colorbar stays with plotting window. What I want is to put it into seperate dialog (or window) so that it can be freely moved around. Here colorbar is simply used to display information of color contours. Sorry that I did not make it clear in the first post.

Thanks,
Zhen
0 Kudos
Jugoslav_Dujic
Valued Contributor II
858 Views
Groan... the Forum is again having issues... resulting in silent discarding of messages it doesn't like :smileymad:.
Let's go again -- attached is a sample dialog in QuickWinwhich does what you need.Several notes:
1) You have to useeither XFLOGM 1.0(insert XFLOGM.f90 into your project and remove "xft.lib" from Project/Settings/Link) or install XFT libraryto build it.
2) The dialog will work only if DlgModeless is called from a callback; it won't work if you invoke it from PROGRAM or any subroutines it calls directly.
3) Note that control ID's are sorted and increasing by 1, which enables more elegant handling and use of DO-loops. To ensure that, you can edit Resource.h and Resource.fd manually.
4) I purposefully defined 6 controls but used only 5 -- I assumed that number of entrieswill bevariable in your case. Thus, you should draw the maximum controls you need, and reduce the number either by resizing the dialog (as in example), and/or hiding unused ones via ShowWindow or DlgSet(DLG_VISIBLE).
Hope this helps,
Jugoslav
0 Kudos
Reply