I have several StringGadgets in a dialog and I would like the user to be able to highlight all or part of a string then CNTRL C to copy it and CNTRL V to paste it.
I find that Copy does not work... is there a flag that can be set to make it do so?
Thanks in advance...
			
			
									
									
						CNTRL C and V with a StringGadget
- 
				Sub-Routine
 - User

 - Posts: 82
 - Joined: Tue May 03, 2005 2:51 am
 - Location: Wheeling, Illinois, USA
 - Contact:
 
- utopiomania
 - Addict

 - Posts: 1655
 - Joined: Tue May 10, 2005 10:00 pm
 - Location: Norway
 
OK, I've found out what does it...
If you disable the hot key shortcuts then it all works OK... with the shortcuts added the copy function fails and paste puts in stuff from earlier operations. 
However, if hot key CNTRL C is disabled all is well... I guess thats reasonable!
  
			
			
									
									
						Code: Select all
Version$="Test only..."
If OpenWindow(0,10,10,300,200,#PB_Window_MinimizeGadget,Version$)
  If CreateGadgetList(WindowID())
    Frame3DGadget(1,5,5,290,100,"Test")
    StringGadget (2,10,30,280,25,"Number 1",#PB_String_UpperCase)
    StringGadget (3,10,70,280,25,"Number 2",#PB_String_UpperCase)
  EndIf
  
  hMenu.l = CreateMenu(0, WindowID())
  If hMenu.l
    MenuTitle("File")
    MenuBar()
    MenuItem(19,"Beeps")
  EndIf
  
  ; Main display HOT KEYS
  AddKeyboardShortcut(0, #PB_Shortcut_Control | #PB_Shortcut_P    ,500)
  AddKeyboardShortcut(0, #PB_Shortcut_Control | #PB_Shortcut_C    ,501)
  AddKeyboardShortcut(0, #PB_Shortcut_Control | #PB_Shortcut_S    ,502)
  AddKeyboardShortcut(0, #PB_Shortcut_Control | #PB_Shortcut_Home ,503)
 
EndIf
Quit =0
Repeat
  EventID.l = WaitWindowEvent()
  If EventID = #PB_Event_CloseWindow 
    Quit = 1
  EndIf
Until Quit = 1
However, if hot key CNTRL C is disabled all is well... I guess thats reasonable!

