---
title: "BasicKeyboards Collection"
canonical: "https://docs.cuesystem.com/space/CVCGC/401178660/BasicKeyboards%20Collection"
format: markdown
---
> Macro (toc)

---

# Description

All keyboards and pads allow entering input text. Input text can be initialized during the show object and you can add the next character or delete the last one.

The following types of BasicKeyboards are available

> Macro (children)

# Common Properties

|  |  |  |  |  |
| --- | --- | --- | --- | --- |
| Property Name | Data Type | Allowed Values | Default Value | Description |
| Appearance |
| Align | Long | Left-Top   
Left-Middle   
Left-Bottom   
Center-Top   
Center-Middle Center-Bottom Right-Top   
Right-Middle  
Right-Bottom | Center-Middle | Alignment of the object on the screen. |
| Font | AddressOf _Font | Any | fntDefault23 | Font of button captions and display area. fntDefault23 is Impact 23 pixels high. |
| Keyboard |
| AutoHide | Boolean | Yes No | Yes | If Yes the object automatically hides after press of the button Enter.   
If No the button Close must be pressed to hide. |
| Movable | Boolean | Yes No | Yes | If Yes the object can be moved on the screen by touch and drag. Touch must be done outside of buttons. |
| Prompt | AddressOf Text | Any | Nothing | This text is displayed when input text is empty. PromptText is displayed by different color then input text. |

# Common Functions

## SetAlign 

This function sets alignment of the object on screen. You can use meaningful BitOr combinations of following constants as parameter

- _OW_ALIGNLEFT
- _OW_ALIGNHCENTER
- _OW_ALIGNRIGHT
- _OW_ALIGNTOP
- _OW_ALIGNVCENTER
- _OW_ALIGNBOTTOM

The function returns True on success or False if an error occurs.

#### Syntax

```visualbasic
Function SetAlign(newalign As Long) As Boolean
```

## GetAlign 

This function returns current alignment of the object on screen.

#### Syntax

```visualbasic
Function GetAlign() As Long
```

## SetAutoHide 

This function sets AutoHide property to newautohide value. Function returns True.

#### Syntax

```visualbasic
Function SetAutoHide(newautohide As Boolean) As Boolean
```

## GetAutoHide 

This function returns the current value of AutoHide property.

#### Syntax

```visualbasic
Function GetAutoHide() As Boolean
```

## SetFont 

This function sets font to newfont. This font is used for all buttons and for display area. Function returns True on success or False if an error occurs.

#### Syntax

```visualbasic
Function SetFont(newfont As AddressOf _Font) As Boolean
```

## GetFont 

This function returns the current font used for buttons and display area.

#### Syntax

```visualbasic
Function GetFont() As AddressOf _Font
```

## SetMovable 

This function sets Movable property to newmovable value. Function returns True.

#### Syntax

```visualbasic
Function SetMovable(newmovable As Boolean) As Boolean
```

## GetMovable 

This function returns the current value of Movable property.

#### Syntax

```visualbasic
Function GetMovable() As Boolean
```

## SetPrompt 

This function sets Prompt to newprompt. Function returns True.

#### Syntax

```visualbasic
Function SetPrompt(newprompt As Text) As Boolean
```

## GetPrompt 

This function returns the current value of property Prompt.

#### Syntax

```visualbasic
Function GetPrompt() As AddressOf Text
```

## SetSmallSize 

This function sets object size to small size. If parameter smallsize is False then full size of object is set. Function returns True.

#### Syntax

```visualbasic
Function SetSmallSize(Optional smallsize As Boolean := True) As Boolean
```

## GetSmallSize 

This function returns the current object size - True means small size, False means full size.

#### Syntax

```visualbasic
Function GetSmallSize() As Boolean
```

## SetText 

This function sets text to newtext. It returns True.

#### Syntax

```visualbasic
Function SetText(newtext As Text) As Boolean
```

## GetText 

This function returns address of current text.

#### Syntax

```visualbasic
Function GetText() As AddressOf Text
```

## ShowObject 

This function shows object, property Visible is set to True.

Parameter newinittext is text which will be displayed when keyboard is opened and input text is set to newinittext. If PasswordMask is Yes then newinittext is ignored.

Parameter newid is identification number of keyboard and this number is returned as parameter of every event.

Parameter newflags defines open mode of a keyboard. You can use following constants as parameter

- _OW_TOPMOST
- _OW_MODAL
- 0 for Modeless mode

Function returns True on success or False if an error occurs.

#### Syntax

```visualbasic
Function ShowObject(
  Optional newinittext As Text := ““, 
  Optional newid As Long := 0, 
  Optional newflags As Long := _OW_MODAL) 
As Boolean
```