Jump to content

Replace Tabs for Columns?


telmob
 Share

Recommended Posts

Hey everyone.

I'm making a program for my company with all sorts of features, and i want it to look nice, basically like the one on the picture.

I'm using KODA to do it, but... with tabs, it looks ugly and also with buttons, so is it possible to use columns to replace the tab function?

Posted Image

Link to comment
Share on other sites

  • Moderators

telmob,

You could just use labels: ;)

:)

#include <GUIConstantsEx.au3>

Global $aLabel[4]

$hGUI = GUICreate("Test", 500, 500)

For $i = 0 To 3
    $aLabel[$i] = GUICtrlCreateLabel("Page " & $i + 1, 100 * ($i + 1), 10, 100, 20)
Next

GUISetState()

While 1

    $iMsg = GUIGetMsg()
    Switch $iMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $aLabel[0] To $aLabel[3]
            MsgBox(0, "Clicked", "Show controls on Page " & $iMsg - $aLabel[0] + 1)

    EndSwitch

WEnd

Any use? :graduated:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

I guess it's a way to do it, but that way i would lose the button functionality. The user would have to click on the text itself and not on the button.

I suppose i could also use a graphic as a button but that would be more difficult and would slow down the program a bit to add one graphic for over effect, another for pressed and another for release.

I have o think about it. :graduated:

Link to comment
Share on other sites

  • Moderators

telmob,

The user would have to click on the text itself and not on the button

No, you can click anywhere on the label: :graduated:

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>

Global $aLabel[4], $aColour[4] = [0xFF0000, 0x00FF00, 0xFFFF00, 0xCCCCFF]

$hGUI = GUICreate("Test", 500, 500)

For $i = 0 To 3
    $aLabel[$i] = GUICtrlCreateLabel("Page " & $i + 1, 100 * ($i + 1), 10, 100, 20, BitOr($SS_CENTER, $SS_CENTERIMAGE))
    GUICtrlSetBkColor(-1, $aColour[$i])
Next

GUISetState()

While 1

    $iMsg = GUIGetMsg()
    Switch $iMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $aLabel[0] To $aLabel[3]
            MsgBox(0, "Clicked", "Show controls on Page " & $iMsg - $aLabel[0] + 1)

    EndSwitch

WEnd

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Sorry, i was distracted. :)

You're right. I guess my main problem is the looks of it.

But with this i can try and put a graphic behind the text and see how it works. :graduated:

You're the man Melba!

;)

EDIT: Ok, just found zettoButton here on the forums that seems perfect for my needs. ;)

Edited by telmob
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...