Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Navigating the cursor to nxt field on pressing enter (http://forums.winamp.com/showthread.php?t=234864)

chitra shalini 6th January 2006 10:01

Navigating the cursor to nxt field on pressing enter
 
I have a custom page with 3 Dir Request field.while pressing tab from 1st field the focus is going to the dir requst (i.e in the same field to the ...icon)and not the next dir request field.Is it possible to bring the focus to next field

kichik 6th January 2006 10:37

You can set the z-order of the controls using the System plug-in. The z-order sets the tab order of the controls. For example, to reverse the tab order of Field 6, use:
code:
!define SWP_NOSIZE 0x0001
!define SWP_NOMOVE 0x0002
!define SWP_NOACTIVATE 0x0010

ReadINISTr $0 "$PLUGINSDIR\test.ini" "Field 6" "HWND"
ReadINISTr $1 "$PLUGINSDIR\test.ini" "Field 6" "HWND2"
System::Call "user32::SetWindowPos(i $0, i $1, i 0, i 0, i 0, \
i 0, i ${SWP_NOSIZE}|${SWP_NOMOVE}|${SWP_NOACTIVATE})"


chitra shalini 11th January 2006 08:36

Tab order
 
Is it possible to set the tab order forDir Request Field in NSIS

chitra shalini 12th January 2006 08:43

changing the tab order of the default buttons
 
Is it possible to change the tab order of the default buttons in a custom page.

I have a custom page with 3 dir request and 1 check box.
the default buttons are cancel back and install.

Now whether it's possible to set the taborder from 3rd dir request to install then to cancel and next to 1st dir request hwnd2.

kichik 12th January 2006 12:08

I've merged all of your threads into this one thread. Don't open so many threads for the same question.

Now, back to the topic, you can use the method I've shown above to change the tab order. That applies to the Cancel, Back and Next buttons as well.

chitra shalini 12th January 2006 12:37

thanks for u'r reply.I got u'r answer and i was able to change the z-order for the fields in my custom page.but, i d'nt know how to change the default button's z-order .if u can plz reply me.

kichik 12th January 2006 13:08

Use the following to get the HWND of the buttons, and then use the same System::Call line, only with those HWNDs, to set the tab order.
code:
GetDlgItem $0 $HWNDPARENT 1 # next button
GetDlgItem $1 $HWNDPARENT 2 # cancel button
GetDlgItem $3 $HWNDPARENT 3 # back button


chitra shalini 16th January 2006 05:55

Hi i tried a lot but not able to change the order for default buttons.Here is my code please help.

From configdir the focus is going to appdirsel but i want the focus to go to the default button.

code:
ReadINISTr $appdir "$PLUGINSDIR\setupscreen.ini" "Field 3" "HWND"
ReadINISTr $appdirsel "$PLUGINSDIR\setupscreen.ini" "Field 3" "HWND2"
ReadINISTr $datadir "$PLUGINSDIR\setupscreen.ini" "Field 5" "HWND"
ReadINISTr $datadirsel "$PLUGINSDIR\setupscreen.ini" "Field 5" "HWND2"
ReadINISTr $configdir "$PLUGINSDIR\setupscreen.ini" "Field 7" "HWND"
ReadINISTr $configdirsel "$PLUGINSDIR\setupscreen.ini" "Field 7" "HWND2"
ReadINISTr $chkbox "$PLUGINSDIR\setupscreen.ini" "Field 8" "HWND"

GetDlgItem $instbtn $HWNDPARENT 1 # next button
GetDlgItem $cnclbtn $HWNDPARENT 2 # cancel button
GetDlgItem $bkbtn $HWNDPARENT 3 # back button
MessageBox MB_ICONEXCLAMATION|MB_OK "$instbtn $cnclbtn $bkbtn"

System::Call "user32::SetWindowPos(i $datadir, i $appdir, i 0, i 0, i 0, \
i 0, i ${SWP_NOSIZE}|${SWP_NOMOVE}|${SWP_NOACTIVATE})"

System::Call "user32::SetWindowPos(i $configdir, i $datadir, i 0, i 0, i 0, \
i 0, i ${SWP_NOSIZE}|${SWP_NOMOVE}|${SWP_NOACTIVATE})"

System::Call "user32::SetWindowPos(i $instbtn, i $configdir, i 0, i 0, i 0, \
i 0, i ${SWP_NOSIZE}|${SWP_NOMOVE}|${SWP_NOACTIVATE})"

System::Call "user32::SetWindowPos(i $appdirsel, i $instbtn, i 0, i 0, i 0, \
i 0, i ${SWP_NOSIZE}|${SWP_NOMOVE}|${SWP_NOACTIVATE})"

System::Call "user32::SetWindowPos(i $datadirsel, i $appdirsel, i 0, i 0, i 0, \
i 0, i ${SWP_NOSIZE}|${SWP_NOMOVE}|${SWP_NOACTIVATE})"

System::Call "user32::SetWindowPos(i $configdirsel, i $datadirsel, i 0, i 0, i 0, \
i 0, i ${SWP_NOSIZE}|${SWP_NOMOVE}|${SWP_NOACTIVATE})"

System::Call "user32::SetWindowPos(i $chkbox, i $configdirsel, i 0, i 0, i 0, \
i 0, i ${SWP_NOSIZE}|${SWP_NOMOVE}|${SWP_NOACTIVATE})"

System::Call "user32::SetWindowPos(i $bkbtn, i $chkbox, i 0, i 0, i 0, \
i 0, i ${SWP_NOSIZE}|${SWP_NOMOVE}|${SWP_NOACTIVATE})"

System::Call "user32::SetWindowPos(i $cnclbtn, i $bkbtn, i 0, i 0, i 0, \
i 0, i ${SWP_NOSIZE}|${SWP_NOMOVE}|${SWP_NOACTIVATE})"

System::Call "user32::SetWindowPos(i $appdir, i $cnclbtn, i 0, i 0, i 0, \
i 0, i ${SWP_NOSIZE}|${SWP_NOMOVE}|${SWP_NOACTIVATE})"


kichik 17th January 2006 14:22

For that, you must make $configdir the last in the tab-order of the custom dialog. After the last control in the custom dialog is reached, it should go to the buttons.

chitra shalini 18th January 2006 03:35

u mean to say that we can't mix the custom dialogs tab order with the default buttons.

the order is like this

appdir->datadir->configdir->instbtn->appdirsel->datadirsel->configdirsel->chkbox->bkbtn->cnclbtn->appdir.

please reply soon.

chitra shalini 19th January 2006 10:54

Is there any possibility to incccrease the custom page size?
Please do help.I want to change the size os the custom page.

kichik 19th January 2006 17:59

No, you can't mix them, as far as I can remember. At least not without a plug-in that'd handle WM_NEXTDLGCTL manually.

You can increase the custom page size by editing the UI file using Resource Hacker. However, that'd change the size of all dialogs in the installer.


All times are GMT. The time now is 05:17.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.