Dear William,WilliamL wrote:Hey, Shardik! What about the Mac?
unfortunately the only machine I don't have at work is a Mac...

But Windows (NT, XP, 7), AIX, z/OS (Mainframe), Linux (SLES, OpenSuse, Debian, Ubuntu,
Kubuntu, Xubuntu) and a VMWare 4.1 ESX cluster I would have available for testing purposes...

At home I have expanded my above example for MacOS X support:
Code: Select all
CompilerIf #PB_Compiler_OS = #PB_OS_MacOS
ImportC ""
SetControlData(Control, ControlPartCode, TagName, BufferSize, *Buffer)
EndImport
#kControlEditTextPart = 5
#kControlEditTextSelectionTag = 'sele'
Structure ControlEditTextSelectionRec
selStart.W
selEnd.W
EndStructure
CompilerEndIf
OpenWindow(0, 100, 200, 400, 200, "", #PB_Window_MinimizeGadget)
StringGadget(0, 50, 50, 200, 20, "example")
Text$ = GetGadgetText(0)
SetActiveGadget(0)
CompilerSelect #PB_Compiler_OS
CompilerCase #PB_OS_MacOS
TextSelection.ControlEditTextSelectionRec
TextSelection\selStart = Len(Text$)
TextSelection\selEnd = Len(Text$)
SetControlData(GadgetID(0), #kControlEditTextPart, #kControlEditTextSelectionTag, SizeOf(ControlEditTextSelectionRec), @TextSelection)
CompilerCase #PB_OS_Linux
gtk_editable_set_position_(GadgetID(0), -1)
CompilerCase #PB_OS_Windows
SendMessage_(GadgetID(0), #EM_SETSEL, Len(Text$), Len(Text$))
CompilerEndSelect
Repeat
EventID = WaitWindowEvent()
Until EventID = #PB_Event_CloseWindow