Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

supercontrol embedded browse.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tim Kiebert
    replied
    Re: supercontrol embedded browse.

    Ken,

    It looks like you created the browse with control buttons but then removed the buttons from the dialog definition. However the event code for those buttons is still there. The following code would have been activated by a refresh button. The Line in red is what you need to do the refresh. Add your own button or use some other event to triggeer it.
    Code:
    else if a_dlg_button = "browseObj1_RefreshRecord" then 
        a_dlg_button = ""
        [COLOR=Red]browseObj1.command("REFRESH")[/COLOR]
    end if
    In addition, browseObj1 can be treated like a pointer to the browse as one would use it in a stand alone browse. Most if not all actions/methods that one would use in a stand alone browse can be used on the embedded version.

    Leave a comment:


  • Ken Tjia
    replied
    Re: supercontrol embedded browse.

    Hi Tim,
    This is very successfull, thank you.
    i am now removing the data source from active/dbf table to sql

    a new scenerio here would be:

    "How do we refresh the browse?"
    i know re-load the form can do it,
    but can i refresh it with xbasic on the fly?

    appreciate your feedback,

    thanks

    ken tjia

    Leave a comment:


  • Tim Kiebert
    replied
    Re: supercontrol embedded browse.

    Similar question to this thread found at the bottom this thread. :)

    The embedded xdialog needs to have its title set to a variable called dlgtitle not a value of dlgtitle so:

    Remove: dim dlg_title as c
    Remove: dlg_title = "DlgTitle" 'The supercontrol supplies its own title at form runtime which is how it interacts with the xdialog.
    Change: ui_modeless_dlg_box(dlg_title,dlg_body,dlg_event) to: ui_modeless_dlg_box(dlgtitle,dlg_body,dlg_event) 'actually this should be the only line that needs to change to make it work

    Leave a comment:


  • Ken Tjia
    started a topic supercontrol embedded browse.

    supercontrol embedded browse.

    i try to experiment with embedded xdialogs browse on form by way of supercontrol.

    i have these codes created from one of the test browse, name it dlgTitle and Modeless.

    what changes do i need to do in order to make this browse appear on my form, currently it is a pop up xdialog.

    appreciate your assistance,
    thanks.

    dim dlg_title as c
    dim dlg_body as c
    dim dlg_event as c
    dim browseObj1_browse_definition as c
    dim browseObj1_tablename as c

    browseObj1_tablename = "temp_upd.dbf"

    dim flagIsActiveLinkTable as l
    flagIsActiveLinkTable = a5_is_activelinktable("temp_upd.dbf")

    'If the browse is based on an ActiveLink table then it is necessary to include
    'the {statusarea} directive in the Xdialog definition. This is where progress is reported
    'when the active-link table is fetching records from the server.
    dim StatusAreaCommand as c = ""
    if flagIsActiveLinkTable then
    StatusAreaCommand = "{sp=.5}{statusarea=100,1};"
    end if

    dlg_title = "DlgTitle"

    dlg_body = <<%dlg%
    'If you include the {removecomments} command, any line that starts with an single quote will be treated as a comment.
    {removecomments}
    {can_exit=close}
    {startup=init}
    {xmargin=0}{ymargin=0}
    {stretch=height,width}
    {watch=browseObj1.mode_get()!modechange}
    {card=150,20BrowseCard_browseObj1};



    %dlg%

    dlg_body = stritran(dlg_body,"__StatusArea__",StatusAreaCommand)


    dlg_event = <<%code%
    if a_dlg_button = "close" then
    ui_modeless_dlg_close(dlg_title)
    end if
    if a_dlg_button = "init"
    a_dlg_button = ""
    browseObj1 = a5_XdialogDefaultBrowse(dlg_title,"Browsecard_browseObj1",browseObj1_tablename,"browseObj1_browse_definition")
    'The status bar is only shown if the browse is based on an active-link table.
    'When the browse is fetching data from the server, the status bar displays progress.
    'However, when the browse is not fetching from the server, if the 'status_format' is not set to null, then
    'the status bar will display 'Record x'. Since we don't want any display, we set the status_format to null.
    'Note that the status_format can be set to any expression that evaluates in the context of the current record.
    'e.g. "Record for" + lastname
    browseObj1.Status_format = "\"\""
    end if

    if a_dlg_button = "browseObj1_NavigateFirst" then
    a_dlg_button = ""
    browseObj1.Fetch_First()
    else if a_dlg_button = "browseObj1_NavigateNext" then
    a_dlg_button = ""
    browseObj1.Fetch_Next()

    else if a_dlg_button = "browseObj1_NavigatePrevious" then
    a_dlg_button = ""
    browseObj1.Fetch_Prev()
    else if a_dlg_button = "browseObj1_NavigateLast" then
    a_dlg_button = ""
    browseObj1.Fetch_Last()
    else if a_dlg_button = "browseObj1_FindByKey" then
    a_dlg_button = ""
    browseObj1.Find()

    else if a_dlg_button = "browseObj1_SortAscending" then
    a_dlg_button = ""
    browseObj1.command("SORT_ASCENDING")
    else if a_dlg_button = "browseObj1_SortDescending" then
    a_dlg_button = ""
    browseObj1.command("SORT_DESCENDING")

    else if a_dlg_button = "browseObj1_SaveRecord" then
    a_dlg_button = ""
    browseObj1.commit()
    else if a_dlg_button = "browseObj1_RefreshRecord" then
    a_dlg_button = ""
    browseObj1.command("REFRESH")
    end if

    %code%

    browseObj1_browse_definition = <<%xml%
    <browse gridline_horizontal="yes" gridline_vertical="yes" data_entry_style="default" row_height="16">
    <title showtitles="yes" color="System-ButtonFace" accent_color="System-ButtonHighlight" fill_style="Gradient Horizontal" line_style="solid" line_color="System-ThreeDShadow" top="2" onclick_behaviour="Select">
    <font color="System-ButtonText" name="Arial" size="8"/>
    <flyover color="#224,244,244" accent_color="#195,195,195" fill_style="Gradient Horizontal"/>
    <selected color="#241,193,95" accent_color="#249,217,159" fill_style="Gradient Horizontal" font_color="System-ButtonText"/>
    <focused color="#242,149,54" accent_color="#255,213,141" fill_style="Gradient Horizontal" font_color="System-ButtonText"/>
    </title>
    <background color="White" accent_color="Black" fill_style="Transparent"/>
    <row_selector color="Win3D" accent_color="Black" fill_style="Transparent" line_style="solid" line_color="System-ThreeDShadow">
    <selected color="#255,213,141" accent_color="Black" fill_style="Solid"/>
    <focused color="#241,192,92" accent_color="Black" fill_style="Solid"/>
    </row_selector>
    <splitter color="Win3D"/>
    <horizontal line_color="System-ButtonFace" line_style="solid"/>
    <vertical line_color="System-ButtonFace" line_style="solid"/>
    <separator_top line_style="default"/>
    <separator_bottom line_style="default"/>
    <separator_left line_style="default"/>
    <separator_right line_style="default"/>
    <cells>
    <cell color="#255,255,255" accent_color="#255,255,255" fill_style="Solid" font_color="#0,0,0" count="1"/>
    <cell color="#244,244,255" accent_color="#244,244,255" fill_style="Solid" font_color="#0,0,0" count="1"/>
    </cells>
    <selected color="System-Highlight" accent_color="Black" fill_style="Solid" font_color="System-HighlightText"/>
    <focused color="System-Highlight" accent_color="Black" fill_style="Solid" font_color="System-HighlightText"/>
    <currentrow color="System-Highlight" accent_color="Black" fill_style="Solid" font_color="System-HighlightText"/>
    <currentcolumn color="System-Highlight" accent_color="Black" fill_style="Solid" font_color="System-HighlightText"/>
    <new_record_appearance color="Win3D" accent_color="Off White" fill_style="Transparent"/>
    <font size="2"/>
    <font size="2"/>
    <columns>
    <column name="UPD" align="Left" text_format="None">
    <font color="&lt;default&gt;" name="Tahoma" size="8"/>
    <border color="Black" style="No border" has_left_edge="yes" has_right_edge="yes" has_top_edge="yes" has_bottom_edge="yes"/>
    <fill color="&lt;default&gt;" accent_color="White" style="Transparent"/>
    <shadow style="None"/>
    <entry name="temp_upd-&gt;UPD" width="6"/>
    <object name="UPD" column_title="UPD" width="0.666666666666667"/>
    </column>
    <column name="UPD_DESC" align="Left" text_format="None">
    <font color="&lt;default&gt;" name="Tahoma" size="8"/>
    <border color="Black" style="No border" has_left_edge="yes" has_right_edge="yes" has_top_edge="yes" has_bottom_edge="yes"/>
    <fill color="&lt;default&gt;" accent_color="White" style="Transparent"/>
    <shadow style="None"/>
    <entry name="temp_upd-&gt;UPD_DESC" width="50"/>
    <object name="UPD_DESC" column_title="UPD_DESC" width="3.5"/>
    </column>
    <column name="MFTR_NUMBER" align="Left" text_format="None">
    <font color="&lt;default&gt;" name="Tahoma" size="8"/>
    <border color="Black" style="No border" has_left_edge="yes" has_right_edge="yes" has_top_edge="yes" has_bottom_edge="yes"/>
    <fill color="&lt;default&gt;" accent_color="White" style="Transparent"/>
    <shadow style="None"/>
    <entry name="temp_upd-&gt;MFTR_NUMBER" width="50"/>
    <object name="MFTR_NUMBER" column_title="MFTR_NUMBER" width="3.5"/>
    </column>
    <column name="TABLE_ID" align="Left" text_format="None">
    <font color="&lt;default&gt;" name="Tahoma" size="8"/>
    <border color="Black" style="No border" has_left_edge="yes" has_right_edge="yes" has_top_edge="yes" has_bottom_edge="yes"/>
    <fill color="&lt;default&gt;" accent_color="White" style="Transparent"/>
    <shadow style="None"/>
    <entry name="temp_upd-&gt;TABLE_ID" width="8"/>
    <object name="TABLE_ID" column_title="TABLE_ID" width="0.885416666666667"/>
    </column>
    <column name="DATA_DATE" align="Left" text_format="None">
    <font color="&lt;default&gt;" name="Tahoma" size="8"/>
    <border color="Black" style="No border" has_left_edge="yes" has_right_edge="yes" has_top_edge="yes" has_bottom_edge="yes"/>
    <fill color="&lt;default&gt;" accent_color="White" style="Transparent"/>
    <shadow style="None"/>
    <entry name="temp_upd-&gt;DATA_DATE" width="8"/>
    <object name="DATA_DATE" column_title="DATA_DATE" width="0.885416666666667"/>
    </column>
    </columns>
    </browse>
    %xml%

    'Now, display the Xdialog.
    ui_modeless_dlg_box(dlg_title,dlg_body,dlg_event)
Working...
X