Setting focus on a list

More
01 May 2023 01:49 #270366 by Vmax549
Replied by Vmax549 on topic Setting focus on a list
Also noticed that when you grab Focus on the Gcode window it sets the cursor to the end of the file. Could this be set to the start of the file ???

I remeber see something somewhere that did that. Just cannot remember where it was exactly.

(;-) TP

Please Log in or Create an account to join the conversation.

More
01 May 2023 21:44 #270434 by snowgoer540
Replied by snowgoer540 on topic Setting focus on a list
I cant test the grab focus part, since I cant arrow key scroll without it wanting to jog.

but this works here, I left the grab_focus line commented out in case you need it:
ui_misc.set_current_notebook_page_by_id(self.notebook, 'notebook_main_fixed')
ui_misc.set_current_notebook_page_by_id(self.gcode_options_notebook, 'gcode_page_fixed')
#self.sourceview.grab_focus()
self.scroll_sourceview_to_mark('start')

Please Log in or Create an account to join the conversation.

More
02 May 2023 01:02 #270440 by Vmax549
Replied by Vmax549 on topic Setting focus on a list
I tried that earlier and it did not work but I will try it again. Do yo have the tenkey section on the right of the keyboard ? if so turn OFF the numlock and use thows arrow keys you can UP or page up at a time.
(;-) TP

Please Log in or Create an account to join the conversation.

More
02 May 2023 23:57 #270529 by snowgoer540
Replied by snowgoer540 on topic Setting focus on a list
It does work here, but I do need the grab focus line.  So this:
ui_misc.set_current_notebook_page_by_id(self.notebook, 'notebook_main_fixed')
ui_misc.set_current_notebook_page_by_id(self.gcode_options_notebook, 'gcode_page_fixed')
self.sourceview.grab_focus()
self.scroll_sourceview_to_mark('start')

Please Log in or Create an account to join the conversation.

More
02 May 2023 23:58 #270530 by snowgoer540
Replied by snowgoer540 on topic Setting focus on a list
Thanks for the tip on page up page down on the number pad. I would not have tried that!

Please Log in or Create an account to join the conversation.

More
03 May 2023 01:53 - 03 May 2023 01:55 #270531 by Vmax549
Replied by Vmax549 on topic Setting focus on a list
HUM, whenI try that code here the cursor ends up at the bottom of the Gcode list. Still useable but you have to press and hold the KP_pageUP till it scrolls back to the top one page at a time. On large 3d files that could take a bit.

(;-) TP
Last edit: 03 May 2023 01:55 by Vmax549.

Please Log in or Create an account to join the conversation.

More
03 May 2023 02:14 #270532 by Vmax549
Replied by Vmax549 on topic Setting focus on a list
Actually the MainPage function is not as important as the File Page function. I can switch to the File page OK but I have not mastered setting the cursor on the File list yet. I guees I need to fiure out what it is actually called in Glade. Then hunt down the action code for it.

(;-) TP

Please Log in or Create an account to join the conversation.

More
04 May 2023 00:52 #270604 by snowgoer540
Replied by snowgoer540 on topic Setting focus on a list
It seems it's because the cursor wasn't moved to the top.  
I also added a line to select the first line, thus clearing any preview selection, or gcode window selection as well. 
This seems to work all the time for me:
                ui_misc.set_current_notebook_page_by_id(self.notebook, 'notebook_main_fixed')
                ui_misc.set_current_notebook_page_by_id(self.gcode_options_notebook, 'gcode_page_fixed')
                self.sourceview.grab_focus()
                self.gremlin.set_highlight_line(1)
                self.gcodelisting_buffer.place_cursor(self.gcodelisting_buffer.get_start_iter())
                self.scroll_sourceview_to_mark('start')

Please Log in or Create an account to join the conversation.

More
04 May 2023 01:23 #270605 by Vmax549
Replied by Vmax549 on topic Setting focus on a list
OK that works here as well, Thanks (;-) That is one more part of the puzzle completed
Hopefully something like that will work on the File page to set focus on the HD_select file window. Once you gain focus you can finish selecting from the keyboard. Seems Tormach removes focus on things untill it is needed then it stays focused from there on.

(;-) TP

Please Log in or Create an account to join the conversation.

More
04 May 2023 02:42 #270606 by Vmax549
Replied by Vmax549 on topic Setting focus on a list
Question ??? Does PP have a function where it saves a past copy of the script in the event the primary fails ???.

Sometimes I get messages that are NOT in the current script BUT were in a past script. So it seems PP is trying to run a saved script ??

(;-) TP

Please Log in or Create an account to join the conversation.

Moderators: cncbasher
Time to create page: 0.072 seconds
Powered by Kunena Forum