Old 6th January 2006, 10:01   #1
chitra shalini
Junior Member
 
Join Date: Jan 2006
Location: bangalore,india
Posts: 8
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
chitra shalini is offline   Reply With Quote
Old 6th January 2006, 10:37   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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})"


NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 11th January 2006, 08:36   #3
chitra shalini
Junior Member
 
Join Date: Jan 2006
Location: bangalore,india
Posts: 8
Tab order

Is it possible to set the tab order forDir Request Field in NSIS
chitra shalini is offline   Reply With Quote
Old 12th January 2006, 08:43   #4
chitra shalini
Junior Member
 
Join Date: Jan 2006
Location: bangalore,india
Posts: 8
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.
chitra shalini is offline   Reply With Quote
Old 12th January 2006, 12:08   #5
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 12th January 2006, 12:37   #6
chitra shalini
Junior Member
 
Join Date: Jan 2006
Location: bangalore,india
Posts: 8
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.
chitra shalini is offline   Reply With Quote
Old 12th January 2006, 13:08   #7
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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


NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 16th January 2006, 05:55   #8
chitra shalini
Junior Member
 
Join Date: Jan 2006
Location: bangalore,india
Posts: 8
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})"

chitra shalini is offline   Reply With Quote
Old 17th January 2006, 14:22   #9
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 18th January 2006, 03:35   #10
chitra shalini
Junior Member
 
Join Date: Jan 2006
Location: bangalore,india
Posts: 8
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 is offline   Reply With Quote
Old 19th January 2006, 10:54   #11
chitra shalini
Junior Member
 
Join Date: Jan 2006
Location: bangalore,india
Posts: 8
Is there any possibility to incccrease the custom page size?
Please do help.I want to change the size os the custom page.
chitra shalini is offline   Reply With Quote
Old 19th January 2006, 17:59   #12
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump