dialog header buttons



Is there any way to set dialog titlebar icons on the right side of dialog?
I found under themes -> Panels-Dialogs -> Titlebar that titlebar icons can change to another image, but I want to set icons on the right side of dialog.


no one knows? :/

mkantor's picture

Is this what your asking for?


Michael Kantor
SMTS; WaveMaker/SpringSource/VMware

yes, I think that this is it...
I will try for my project later.


this code is not good for me. Icons is still on the left side of dialog, and the order of icons is not good

See the image:
... first is default icon order, second is order by code from link..

Image and video hosting by TinyPic

mkantor's picture

Well, here's attempt #2...

var t = this.mydialog.titleButtonPanel;

Michael Kantor
SMTS; WaveMaker/SpringSource/VMware

Sorry, but for me, don't works... are you tried this code?
I am getting an error:
Cannot call method 'setIndexInParent' of undefined.

This is display properties of my designableDialog
(this type of dialog I have):
Modal: unchecked
NoEscape: unchecked
NoMaxifiy: unchecked
NoMinify unchecked

Which settings do you have?

Can you help me?


mkantor's picture

That is WM 6.5 code; if your in WM 6.4, the equivalent is:

var t = this.mydialog.titleButtonPanel;

Michael Kantor
SMTS; WaveMaker/SpringSource/VMware

"parent" is which element?

this is "layoutBox1" of the main page?

Or this is a dialog titlebar?

Thank you very much for help... I solved this problem using this code:

var t2 = this.dialog.titleBar;

I used a moveControl for moving objects on the titleBar
By default, elements of titleBar of dialog is:
1. close dialog - this is c$[0], has position 1
2. minimize dialog - this is c$[1], has position 2
3. maximize dialog - this is c$[2], has position 3
4. title label - this is c$[3], has position 4

And... I put title label on the first position, and close dialog element on the last position... and this is it..
It works!

Thank you mkantor, but your code for me don+t works... but you helped me a lot with function "moveControl"

Maybe this is not optimal, but it works :)

bonnmos's picture


I get error:
Failed to initialize page dashboard; TypeError: c is undefined.

Here's my code

start: function() {
  var t = this.kpa1Dialog.titleBar;
  t.moveControl(t.c$[3], 1);

This is in the start function of page containing the dialog, I hope that is where the code has to be. Using WM 6.5.1.

mkantor's picture

1. Please note the following addition to WM 6.6: http://dev.wavemaker.com/wiki/bin/wmjsref_6.6/Dialog_titleBarButtonsOnRight

2. If you don't want to wait for WM 6.6 to do this, here's how I did it:

// optional, this shifts the close button to the far right instead of far left

// required; reverses the order of the c$ array, which is the order of widgets in the titlebar

If you do that in your start method, and the dialog does not start off being visible, thats all you need to do. If you want to have the dialog showing from the start, you may need to end this with

Michael Kantor
SMTS; WaveMaker/SpringSource/VMware

bonnmos's picture

Worked like a charm.. :)

Thanks Michael.