Dialog with <option> not usable by keyboard

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Kukulkan
Addict
Addict
Posts: 1396
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Dialog with <option> not usable by keyboard

Post by Kukulkan »

Hi,

Try this code:

Code: Select all

CompilerIf #PB_Compiler_Unicode
  #XmlEncoding = #PB_UTF8
CompilerElse 
  #XmlEncoding = #PB_Ascii
CompilerEndIf

#Dialog = 0
#Xml = 0

XML$ = "<window id='#PB_Any' name='test' text='Gridbox' minwidth='auto' minheight='auto' flags='#PB_Window_ScreenCentered | #PB_Window_SystemMenu | #PB_Window_SizeGadget'>" +
       "    <gridbox columns='1'>" +
       "          <option name='opt1' text='Option 1, check me first using keyboard' />" +
       "          <option name='opt2' text='Option 2, check me secondly using keyboard' />" +
       "    </gridbox>" +
       "  </window>"

If CatchXML(#Xml, @XML$, StringByteLength(XML$), 0, #XmlEncoding) And XMLStatus(#Xml) = #PB_XML_Success
  
  If CreateDialog(#Dialog) And OpenXMLDialog(#Dialog, #Xml, "test")
    
    Repeat
      Event = WaitWindowEvent()
    Until Event = #PB_Event_CloseWindow 
    
  Else  
    Debug "Dialog error: " + DialogError(#Dialog)
  EndIf
Else
  Debug "XML error: " + XMLError(#Xml) + " (Line: " + XMLErrorLine(#Xml) + ")"
EndIf
I'm not able to handle this dialog and select the second option by using the keyboard only... Same for others?

http://msdn.microsoft.com/en-us/library ... navigation

Kukulkan
Last edited by Kukulkan on Wed Nov 06, 2013 7:22 am, edited 1 time in total.
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Dialog with <option> not usable by keyboard

Post by Fred »

It's the same on regular window, it's not specific to dialogs (Moved to feature & request)
Post Reply