Translate

Donnerstag, 10. März 2022

Label of Item alignment LEFT

Oracle APEX (since 5.0) comes with default settings for the labels of items "RIGHT" which looks like:

For several items on a page there is ample space wasted... and to my opinion labels aligned LEFT looks much more "in order"....

How to fix?

Go to "Region" settings -->
Appearance

Template: Standard

Template Options: Advanced --> Lable aligned: LEFT

and all lables of the items are nicely order left...

That's the trick.

Before:


After:










Good luck ! [ nächstes Mal wieder in DE]

And . . . . . . 

You can set this in your Region template!
How to ?

Go to Shared Components
pick: Templates
search for "Region" (templates) and copy "Standard" using the copy icon in the most right column and
name it: "Standard_labels_left" -
Create your new template.
Then search for it again and edit it (click on "Standard_labels_left") and you will see:





 







Now you can switch from "right" to "left" easily - and apply changes.


Whenever you have a form and like the labels to be aligned "LEFT", just assign this template to your region.

my 2 cents.

Donnerstag, 17. Februar 2022

Play beep sound

APEX 21.2 

Für die Bestätigung eines Befehles habe ich gerade mit einem "Beep-Sound" experimentiert, den ich als "Bestätigungs-Ton" nutzen möchte.

Hier meine APEX-Lösung:

1. "Beep-Sound" als "wav-Datei" runterladen... (von: https://www.soundjay.com/beep-sounds-1.html)

2. Die Datei "beep-02.wav" in Shared Components" als "application file" hochladen

3. -- > #APP_FILES#beep-02.wav

4. Seite erstellen mit einer Region namens "Region für Sound"
und einem Button namentlich "Play sound"...

5. Bei den Seitenattributen unter "Page HTML Body Attribute" einfügen: 

<script>
$('<audio id="chatAudio">
<source src="#APP_FILES#beep-02.wav" type="audio/wav">
</audio>')
</script>

6. Dynamic Action bei "Click" anlegen mit Namen: "sound"
    when: click
    selection type: button
    Button: Play_sound

7. "add True action" vom Typ "Execute Javascript Code" und bei

settings/code:     $('#chatAudio')[0].play();  

Referenz: https://stackoverflow.com/a/29517759

Danke an Okwo Moses !!! 

Der exakte Usecase folgt....

Viel Spaß damit !