March 28, 2024, 07:52:03 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Why is it beeping!

Started by Brian, May 10, 2020, 06:11:02 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Brian

May 10, 2020, 06:11:02 AM Last Edit: May 10, 2020, 09:28:29 AM by Brian
Larry,

I'm using your IWMask lib, and am wondering why it always beeps when entering data into the date fields. Any idea?

Also, I have two IWMask date fields, along with another, normal edit box, in a Dialog. The normal edit box does tab (it's the first one), but I can't get the tabbing to move onto the next two IWMask edit boxes

Brian

' Test of IWMask

autodefine "off"

$include "windowssdk.inc"
$include "iwmask.inc"

WINDOW win
ISTRING myDate[32]

CONST COLOR_BTNFACE=15

OPENWINDOW win,0,0,300,300,@MINBOX|@MAXBOX|@SIZE,0,"IWMask Test",&main
CONTROL win,@BUTTON,"OK",20,170,70,20,0x50000000,100
SETWINDOWCOLOR win,GetSysColor(COLOR_BTNFACE)

IWM_Create(win,120,20,102,100,22,0,"D\ate: 00/00/0000","_")
SETFONT win,"MS Sans Serif",8,400,0,120

IWM_Create(win,130,20,132,100,22,0,"D\ate: 00/00/0000","_")
SETFONT win,"MS Sans Serif",8,400,0,130

SETFOCUS win,120

WAITUNTIL IsWindowClosed(win)
END

SUB main(),INT
SELECT @MESSAGE
CASE @IDCREATE
CENTERWINDOW win
CASE @IDCLOSEWINDOW
CLOSEWINDOW win
CASE @IDCONTROL
SELECT @CONTROLID
CASE 100
myDate=IWM_GetMinText(win,120)
SETCAPTION win,myDate
ENDSELECT
ENDSELECT
RETURN 0
ENDSUB

LarryMc

Off the top of my head I don't have any answers. I haven't even thought about that lib since way back when I created it. Give me a little time to look into it.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

QuoteI'm using your IWMask lib, and am wondering why it always beeps when entering data into the date fields. Any idea?
No idea. There's no beeping on my computer.

The quickest solution I can see for the tabbing is to use two callback functions that are built into the lib:
**********************************************************************
IWM_SetTabCallback(WINDOW win, UINT id, uint callback)
Called when the TAB key is pressed

global sub MySub1(int hwnd, int id) ' can be any name you prefer
  'use a series of if/else
     GetFocus(GetControlHandle(hwnd,id))=xx then SetFocus(yy)

   return
endsub

****************************************************************************
the same sort of setup for tabbing backwards
IWM_SetShiftTabCallback(WINDOW win, UINT id, uint callback)
Called when the SHIFT-TAB key is pressed
global sub MySub2(int hwnd, int id)

   return
endsub
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Brian

Thanks, Larry - I will take a look at doing it that way

Brian

LarryMc

actually, I think I set it up so there is one callback sub for EACH control tab and shift tab
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Brian

Well, this is as far as I've got. Still not tabbing correctly, and I don't know how to fix it

If anyone has a look, I am still getting a bong when I try to insert numbers into the date field

Brian

LarryMc

I've sent you an email and a test lib to try out.
Let me know the results.
Each mask control you create will have a tab sub and in that sub all you need to do
is use the SETFOCUS command to the control you want to go  to.
Same for the ALT-TAB sub.

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library